Objective

 

 

Objective Class

 

The Objective is the interface for a user's Quest Objective

 

Syntax

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

 

See Also

Remarks

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 ObjectiveDefinition . The Sansar.Simulation.QuestDefinition for this quest.
[read-only]
IsValid bool . Whether or not this interface is valid. (Inherited from Sansar.Script.InstanceInterface.)

Public Methods

  GetState () : ObjectiveState
The Sansar.Simulation.ObjectiveState representing the user's progress in the quest
  SetState (ObjectiveState)
Set the state of the objective.
  SetState (ObjectiveState, Action<Sansar.Script.OperationCompleteEvent>)
Set the state of the objective.
  Subscribe (ObjectiveState, Action<ObjectiveData>, bool) : Sansar.Script.IEventSubscription
Subscribes to Objective 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 ObjectiveDefinition Definition { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

GetState Method

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

Syntax

[Sansar.Script.Interface]
public ObjectiveState 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

SetState Method

Set the state of the objective.

Syntax

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

Parameters

state
The state to transition to.

Remarks

Some state changes may not be permitted, in these cases Sansar.Script.OperationCompleteEvent success will be false.

Requirements

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

SetState Method

Set the state of the objective.

Syntax

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

Parameters

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

Remarks

Some state changes may not be permitted, in these cases Sansar.Script.OperationCompleteEvent success will be false.

Requirements

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

Subscribe Method

Subscribes to Objective Events.

Syntax

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

See Also

Parameters

State
The state of the objective
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.