|
Drag[en]gine Script Module DragonScript 1.35
|
State machine. More...
Public Member Functions | |
| void | addState (SMState state) |
| Add state. | |
| void | addStateReplace (SMState state) |
| Add state replacing existing one if present. | |
| void | addTransition (SMTransition transition) |
| Add transition. | |
| SMTransition | findTransition (Block ablock) |
| Find transition with block with parameter SMTransition. | |
| void | forEachState (Block ablock) |
| Visit states with block. | |
| void | forEachTransition (Block ablock) |
| Visit transitions with block with parameter SMTransition. | |
| String | getFilename () |
| Filename or null. | |
| String | getInitialState () |
| Initial state or null if not set. | |
| SMState | getStateAt (String id) |
| State with identifier or null if absent. | |
| int | getStateCount () |
| Count of states. | |
| SMTransition | getTransitionAt (int index) |
| Get transition at index. | |
| int | getTransitionCount () |
| Count of transitions. | |
| bool | hasStateAt (String id) |
| State with identifier is present. | |
| int | indexOfTransition (SMTransition transition) |
| Index of transition or -1 if absent. | |
| StateMachine | new () |
| Create state machine. | |
| StateMachine | new (String filename) |
| Create state machine with filename. | |
| void | removeAllTransitions () |
| Remove all transitions. | |
| void | removeState (SMState state) |
| Remove state. | |
| void | removeTransition (SMTransition transition) |
| Remove transition. | |
| void | setInitialState (String initialState) |
| Set initial state. | |
Static Public Member Functions | |
| static StateMachine | newEmpty () |
| Create state machine with empty state. | |
Public Attributes | |
| String | pFilename |
| String | pInitialState |
| Dictionary | pStates |
| Array | pTransitions |
State machine.
| void Dragengine.StateMachineSystem.StateMachine.addState | ( | SMState | state | ) |
Add state.
| EInvalidParam | Another state with the same identifier is present. |
References getStateAt(), and pStates.
Referenced by getInitialState().
| void Dragengine.StateMachineSystem.StateMachine.addStateReplace | ( | SMState | state | ) |
| void Dragengine.StateMachineSystem.StateMachine.addTransition | ( | SMTransition | transition | ) |
Add transition.
References pInitialState, and setInitialState().
Referenced by findTransition().
| SMTransition Dragengine.StateMachineSystem.StateMachine.findTransition | ( | Block | ablock | ) |
Find transition with block with parameter SMTransition.
References addTransition(), findTransition(), forEachTransition(), getTransitionAt(), indexOfTransition(), pTransitions, removeAllTransitions(), and removeTransition().
Referenced by findTransition().
| void Dragengine.StateMachineSystem.StateMachine.forEachState | ( | Block | ablock | ) |
Visit states with block.
Block has signature (SMState).
References hasStateAt(), and pStates.
Referenced by removeState().
| void Dragengine.StateMachineSystem.StateMachine.forEachTransition | ( | Block | ablock | ) |
Visit transitions with block with parameter SMTransition.
References getTransitionCount(), and pTransitions.
Referenced by findTransition().
| String Dragengine.StateMachineSystem.StateMachine.getFilename | ( | ) |
| String Dragengine.StateMachineSystem.StateMachine.getInitialState | ( | ) |
| SMState Dragengine.StateMachineSystem.StateMachine.getStateAt | ( | String | id | ) |
State with identifier or null if absent.
References getStateCount(), and pStates.
Referenced by addState().
| int Dragengine.StateMachineSystem.StateMachine.getStateCount | ( | ) |
Count of states.
Referenced by getStateAt().
| SMTransition Dragengine.StateMachineSystem.StateMachine.getTransitionAt | ( | int | index | ) |
Get transition at index.
References addStateReplace(), and pStates.
Referenced by findTransition().
| int Dragengine.StateMachineSystem.StateMachine.getTransitionCount | ( | ) |
| bool Dragengine.StateMachineSystem.StateMachine.hasStateAt | ( | String | id | ) |
| int Dragengine.StateMachineSystem.StateMachine.indexOfTransition | ( | SMTransition | transition | ) |
Index of transition or -1 if absent.
References getInitialState().
Referenced by findTransition().
| StateMachine Dragengine.StateMachineSystem.StateMachine.new | ( | ) |
| StateMachine Dragengine.StateMachineSystem.StateMachine.new | ( | String | filename | ) |
Create state machine with filename.
|
static |
| void Dragengine.StateMachineSystem.StateMachine.removeAllTransitions | ( | ) |
Remove all transitions.
References getFilename(), and pFilename.
Referenced by findTransition().
| void Dragengine.StateMachineSystem.StateMachine.removeState | ( | SMState | state | ) |
| void Dragengine.StateMachineSystem.StateMachine.removeTransition | ( | SMTransition | transition | ) |
| void Dragengine.StateMachineSystem.StateMachine.setInitialState | ( | String | initialState | ) |
| String Dragengine.StateMachineSystem.StateMachine.pFilename |
Referenced by hasStateAt(), and removeAllTransitions().
| String Dragengine.StateMachineSystem.StateMachine.pInitialState |
Referenced by addTransition().
| Dictionary Dragengine.StateMachineSystem.StateMachine.pStates |
Referenced by addState(), forEachState(), getStateAt(), getTransitionAt(), getTransitionCount(), new(), removeState(), and setInitialState().
| Array Dragengine.StateMachineSystem.StateMachine.pTransitions |
Referenced by findTransition(), forEachTransition(), and new().