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
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
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[]. Returns a list of the objectives for this quest. |
[read-only] | Ready | bool . If the Quest data is ready. |
Public Methods
GetState () : QuestState
The Sansar.Simulation.QuestState representing the user's progress in the quest. |
||
Offer ()
Offer the quest to a user. |
||
Offer (Action<Sansar.Script.OperationCompleteEvent>)
Offer the quest to a user. |
||
SetState (QuestState)
Set the state of the quest |
||
SetState (QuestState, Action<Sansar.Script.OperationCompleteEvent>)
Set the state of the quest |
||
Subscribe (QuestState, Action<QuestData>, bool) : Sansar.Script.IEventSubscription
Subscribes to Quest Events. |
||
override
|
ToString () : string
A string representation of this object. |
|
Update ()
Update the ObjectiveDefinition data. |
||
Update (Action<Sansar.Script.OperationCompleteEvent>)
Update the ObjectiveDefinition data. |
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
The Sansar.Simulation.QuestDefinition for this quest.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
Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
Objectives Property
Returns a list of the objectives for this quest.Syntax
[get: Sansar.Script.Interface]
public Objective[] Objectives { 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
Offer Method
Offer the quest to a user.Syntax
[Sansar.Script.Interface]
public void Offer ()Remarks
Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
Offer Method
Offer the quest to a user.Syntax
Parameters
- handler
- Handler to be called when the event completes.
Remarks
Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
Ready Property
If the Quest data is ready.Syntax
[get: Sansar.Script.Interface]
public bool Ready { get; }Value
Documentation for this section has not yet been entered.Remarks
Returns false until the data has been fetched from the quest service. Once it returns true it will always return true.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetState Method
Set the state of the questSyntax
Parameters
- state
- The state to transition to.
Remarks
Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetState Method
Set the state of the questSyntax
[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
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
Update Method
Update the ObjectiveDefinition data.Syntax
[Sansar.Script.Interface]
public void Update ()Remarks
Use in a WaitFor to wait for the data for the QuestDefinition to be ready. Once data is retrieved and Ready is true it will never again be false.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
Update Method
Update the ObjectiveDefinition data.Syntax
Parameters
- handler
- Handler to be called when the event completes.
Remarks
Use in a WaitFor to wait for the data for the QuestDefinition to be ready. Once data is retrieved and Ready is true it will never again be false.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
0 Comments