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

State machine transition. More...

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

Classes

enum  ConditionMode
 Condition modes. More...

Public Member Functions

void addAction (SMStateAction action)
 Add action.
SMStateAction findAction (Block ablock)
 Find action with block with parameter SMStateAction.
void forEachAction (Block ablock)
 Visit actions with block with parameter SMStateAction.
SMStateAction getActionAt (int index)
 Get action at index.
int getActionCount ()
 Count of actions.
String getDelegate ()
 Identifier of delegate event or null.
String getStateID ()
 Identifier of state to switch to or null to stay in the same state.
void importState (SMState state)
 Import state.
SMTransition new (SMTransition transition)
 Create copy of state machine transition.
SMTransition new (String event)
 Create state machine transition staying in the same state.
SMTransition new (String event, String stateID)
 Create state machine transition.
SMTransition new (String event, String stateID, String delegate)
 Create state machine transition.
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

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

Detailed Description

State machine transition.

Transitions run a set of actions before activating the new state in the state machine.

Member Function Documentation

◆ addAction()

void Dragengine.StateMachineSystem.SMTransition.addAction ( SMStateAction action)

Add action.

References pActions.

Referenced by importState().

◆ findAction()

SMStateAction Dragengine.StateMachineSystem.SMTransition.findAction ( Block ablock)

Find action with block with parameter SMStateAction.

References getStateID(), and pEvent.

Referenced by importState().

◆ forEachAction()

void Dragengine.StateMachineSystem.SMTransition.forEachAction ( Block ablock)

Visit actions with block with parameter SMStateAction.

Referenced by importState().

◆ getActionAt()

SMStateAction Dragengine.StateMachineSystem.SMTransition.getActionAt ( int index)

Get action at index.

References new(), and pEvent.

Referenced by importState().

◆ getActionCount()

int Dragengine.StateMachineSystem.SMTransition.getActionCount ( )

Count of actions.

Referenced by importState().

◆ getDelegate()

String Dragengine.StateMachineSystem.SMTransition.getDelegate ( )

Identifier of delegate event or null.

References new(), and pActions.

Referenced by importState().

◆ getStateID()

String Dragengine.StateMachineSystem.SMTransition.getStateID ( )

Identifier of state to switch to or null to stay in the same state.

References pEvent.

Referenced by findAction(), and importState().

◆ importState()

void Dragengine.StateMachineSystem.SMTransition.importState ( SMState state)

Import state.

Version
1.26

Adds enter and exit actions as transitions actions. If state has next state set it

References addAction(), Dragengine.StateMachineSystem.SMConditionGroup.evaluateConditions(), findAction(), forEachAction(), getActionAt(), getActionCount(), getDelegate(), getStateID(), importState(), new(), and pActions.

Referenced by importState().

◆ new() [1/4]

SMTransition Dragengine.StateMachineSystem.SMTransition.new ( SMTransition transition)

Create copy of state machine transition.

Version
1.26

References new().

◆ new() [2/4]

SMTransition Dragengine.StateMachineSystem.SMTransition.new ( String event)

Create state machine transition staying in the same state.

Parameters
eventEvent to react to.

References new().

Referenced by getActionAt(), getDelegate(), importState(), new(), new(), new(), and new().

◆ new() [3/4]

SMTransition Dragengine.StateMachineSystem.SMTransition.new ( String event,
String stateID )

Create state machine transition.

Parameters
eventEvent to react to.
stateIDState to switch to or null to stay in the same state.

References new().

◆ new() [4/4]

SMTransition Dragengine.StateMachineSystem.SMTransition.new ( String event,
String stateID,
String delegate )

Create state machine transition.

Version
1.35
Parameters
eventEvent to react to.
stateIDState to switch to or null to stay in the same state.
delegateEventDelegate event or null.

References new().

Member Data Documentation

◆ pActions

Array Dragengine.StateMachineSystem.SMTransition.pActions

Referenced by addAction(), getDelegate(), and importState().

◆ pEvent

String Dragengine.StateMachineSystem.SMTransition.pEvent

Referenced by findAction(), getActionAt(), and getStateID().


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