Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.StateMachineSystem.SMStateAction Class Reference

Action to run in a state machine state. More...

Inheritance diagram for Dragengine.StateMachineSystem.SMStateAction:
Dragengine.StateMachineSystem.SMConditionGroup

Public Member Functions

String getActionID ()
 Action identifier or null.
String getStateID ()
 State to transition to after action finished or null.
SMStateAction new (SMStateAction action)
 Create copy of state machine action.
SMStateAction new (String actionID)
 Create state machine action.
bool run (SMContext context)
 Run action.
void setStateID (String id)
 Set state to transition to after action finished or null.
Public Member Functions inherited from Dragengine.StateMachineSystem.SMConditionGroup
void addCondition (String condition)
 Add condition.
void addConditionGroup (SMConditionGroup group)
 Add condition group.
bool evaluateConditions (SMContext context)
 Evaluate conditions.
String findCondition (Block ablock)
 Find condition with block with parameter String.
SMConditionGroup findConditionGroup (Block ablock)
 Find condition group with block with parameter SMConditionGroup.
void forEachCondition (Block ablock)
 Visit conditions with block with parameter String.
void forEachConditionGroup (Block ablock)
 Visit condition groups with block with parameter SMConditionGroup.
String getConditionAt (int index)
 Get condition at index.
int getConditionCount ()
 Count of conditions.
SMConditionGroup getConditionGroupAt (int index)
 Get condition group at index.
int getConditionGroupCount ()
 Count of condition groups.
Array getConditionGroups ()
 Get all condition groups as Array of SMConditionGroup.
SMTransition.ConditionMode getConditionMode ()
 Condition mode.
Array getConditions ()
 Get all conditions as Array of String.
Dictionary getParameters ()
 Parameters as Dictionary of String key and String value.
SMConditionGroup new ()
 Create condition group.
SMConditionGroup new (SMConditionGroup group)
 Create copy of condition group.
void setConditionMode (SMTransition.ConditionMode mode)
 Set condition mode.

Public Attributes

String pActionID
Public Attributes inherited from Dragengine.StateMachineSystem.SMConditionGroup
SMTransition.ConditionMode pConditionMode
Array pConditions
Dictionary pParameters

Detailed Description

Action to run in a state machine state.

SMAction subclasses are created by the game developer and added to the state machine. If state action is run the action is looked up and run.

Member Function Documentation

◆ getActionID()

String Dragengine.StateMachineSystem.SMStateAction.getActionID ( )

Action identifier or null.

References getActionID().

Referenced by getActionID().

◆ getStateID()

String Dragengine.StateMachineSystem.SMStateAction.getStateID ( )

State to transition to after action finished or null.

Version
1.26

References pActionID.

Referenced by setStateID().

◆ new() [1/2]

SMStateAction Dragengine.StateMachineSystem.SMStateAction.new ( SMStateAction action)

Create copy of state machine action.

Version
1.26

References new(), and pActionID.

◆ new() [2/2]

SMStateAction Dragengine.StateMachineSystem.SMStateAction.new ( String actionID)

Create state machine action.

References new(), and pActionID.

Referenced by new(), and new().

◆ run()

bool Dragengine.StateMachineSystem.SMStateAction.run ( SMContext context)

Run action.

Returns
true if action ran or false if conditions are not fulfilled.

References Dragengine.StateMachineSystem.SMConditionGroup.evaluateConditions(), pActionID, run(), and setStateID().

Referenced by run().

◆ setStateID()

void Dragengine.StateMachineSystem.SMStateAction.setStateID ( String id)

Set state to transition to after action finished or null.

Version
1.26

References getStateID().

Referenced by run().

Member Data Documentation

◆ pActionID

String Dragengine.StateMachineSystem.SMStateAction.pActionID

Referenced by getStateID(), new(), new(), and run().


The documentation for this class was generated from the following file: