Quest

 

 

Quest Class

 

The Quest is the interface for a user's progress in a Quest.

 

Syntax

[Sansar.Script.Interface]
public class Quest : Sansar.Script.InstanceInterface

 

Remarks

Each instance of Quest is generated from a Sansar.Simulation.QuestDefinition and is associated with a specific user, represented by a Sansar.Script.SessionId. It can be used to offer the quest to that user, and to track and control their progress through the quest.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Members

See Also: Inherited members from Sansar.Script.InstanceInterface.

Public Properties

[read-only]
Agent Sansar.Script.SessionId . The session Id for the user on this quest.
[read-only]
Definition QuestDefinition . The Sansar.Simulation.QuestDefinition for this quest.
[read-only]
IsValid bool . Whether or not this interface is valid. (Inherited from Sansar.Script.InstanceInterface.)
[read-only]
Objectives Objective[].

Public Methods

  GetState () : QuestState
The Sansar.Simulation.QuestState representing the user's progress in the quest.
  Offer ()
  Offer (Action<Sansar.Script.OperationCompleteEvent>)
  SetState (QuestState)
  SetState (QuestState, Action<Sansar.Script.OperationCompleteEvent>)
  Subscribe (QuestState, Action<QuestData>, bool) : Sansar.Script.IEventSubscription
Subscribes to Quest Events.
override
ToString () : string
A string representation of this object.

 

Member Details

Agent Property

The session Id for the user on this quest.

Syntax

[get: Sansar.Script.Interface]
public Sansar.Script.SessionId Agent { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Definition Property

Syntax

[get: Sansar.Script.Interface]
public QuestDefinition Definition { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

GetState Method

The Sansar.Simulation.QuestState representing the user's progress in the quest.

Syntax

[Sansar.Script.Interface]
public QuestState GetState ()

Returns

Documentation for this section has not yet been entered.

Remarks

Not yet implemented.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Objectives Property

Syntax

[get: Sansar.Script.Interface]
public Objective[] Objectives { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Not yet implemented.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Offer Method

Syntax

[Sansar.Script.Interface]
public void Offer ()

Remarks

Not yet implemented.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Offer Method

Syntax

[Sansar.Script.Interface]
public void Offer (Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

handler
Handler to be called when the event completes.

Remarks

Not yet implemented.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetState Method

Syntax

[Sansar.Script.Interface]
public void SetState (QuestState state)

Parameters

state
The state to transition to.

Remarks

Not yet implemented.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetState Method

Syntax

[Sansar.Script.Interface]
public void SetState (QuestState state, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

state
The state to transition to.
handler
Handler to be called when the event completes.

Remarks

Not yet implemented.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Subscribe Method

Subscribes to Quest Events.

Syntax

[Sansar.Script.Interface]
public Sansar.Script.IEventSubscription Subscribe (QuestState State, Action<QuestData> callback, bool persistent)

See Also

Parameters

State
The state of the quest
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.

Returns

An Sansar.Script.IEventSubscription that can be used to cancel the subscription.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

ToString Method

A string representation of this object.

Syntax

[Sansar.Script.Interface]
public override string ToString ()

Returns

A string representation of this object.

Remarks

The format of this string may change between releases.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

 


 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.