Class representing basic Finite State Machine.
More...
|
| | FiniteStateMachine (Dictionary< IState, Func< IState >> transitionFunctions, IState initialState, string stateMachineName="state machine") |
| | Constructor. - Parameters
-
| transitionFunctions | Transition functions for states. Functions should return the next state or, null - if no transition is to be made. |
| initialState | State with which this state machine will be initialized. |
| stateMachineName | Name of this state machine. |
More...
|
| |
| | FiniteStateMachine (List<(IState sourceState, IState destinationState, Func< bool > condition)> transitions, IState initialState, string stateMachineName="state machine") |
| | Constructor. - Parameters
-
| transitions | Transition function for states defined as (source state, destination state, condition). |
| initialState | State with which this state machine will be initialized. |
| stateMachineName | Name of this state machine. |
More...
|
| |
| override void | Enter () |
| | Called once after machine enters this state. More...
|
| |
| override void | Update (float deltaTime) |
| | Performs state transition, if one is required, and runs update for resulting state. More...
|
| |
| virtual void | Exit () |
| | Called once after machine exits this state. More...
|
| |
|
|
| DefaultState (string stateName) |
| |
| string | Name [get] |
| | Name of this state. More...
|
| |
| string | Name [get] |
| | Name of this state. More...
|
| |
Class representing basic Finite State Machine.
◆ FiniteStateMachine() [1/2]
| Grail.FSM.FiniteStateMachine.FiniteStateMachine |
( |
Dictionary< IState, Func< IState >> |
transitionFunctions, |
|
|
IState |
initialState, |
|
|
string |
stateMachineName = "state machine" |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
| transitionFunctions | Transition functions for states. Functions should return the next state or, null - if no transition is to be made. |
| initialState | State with which this state machine will be initialized. |
| stateMachineName | Name of this state machine. |
◆ FiniteStateMachine() [2/2]
| Grail.FSM.FiniteStateMachine.FiniteStateMachine |
( |
List<(IState sourceState, IState destinationState, Func< bool > condition)> |
transitions, |
|
|
IState |
initialState, |
|
|
string |
stateMachineName = "state machine" |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
| transitions | Transition function for states defined as (source state, destination state, condition). |
| initialState | State with which this state machine will be initialized. |
| stateMachineName | Name of this state machine. |
◆ Enter()
| override void Grail.FSM.FiniteStateMachine.Enter |
( |
| ) |
|
|
inlinevirtual |
◆ Update()
| override void Grail.FSM.FiniteStateMachine.Update |
( |
float |
deltaTime | ) |
|
|
inlinevirtual |
Performs state transition, if one is required, and runs update for resulting state.
Reimplemented from Grail.FSM.DefaultState.
◆ CurrentState
| IState Grail.FSM.FiniteStateMachine.CurrentState => currentState |
The documentation for this class was generated from the following file:
- GrailFiniteStateMachine/source/FiniteStateMachine.cs