Class SmStateMachine
Inheritance
SmStateMachine
Assembly: fwt.core.dll
Syntax
public class SmStateMachine : SmState, ISmState, IStateMachine
Fields
CurrentState
Declaration
public ISmState CurrentState
Field Value
SortedStates
Declaration
public Dictionary<Type, ISmState> SortedStates
Field Value
States
Declaration
public List<ISmState> States
Field Value
Methods
AddState(ISmState)
Declaration
public virtual void AddState(ISmState state)
Parameters
AddState<TState>(TState)
Declaration
public virtual void AddState<TState>(TState state) where TState : ISmState
Parameters
| Type |
Name |
Description |
| TState |
state |
|
Type Parameters
GetState(int)
Declaration
public virtual ISmState GetState(int stateIndex)
Parameters
| Type |
Name |
Description |
| int |
stateIndex |
|
Returns
GetState(Type)
Declaration
public virtual ISmState GetState(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns
GetState<TState>(Type)
Declaration
public virtual TState GetState<TState>(Type type) where TState : ISmState
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns
Type Parameters
PrepareToRun()
Declaration
public override void PrepareToRun()
Overrides
PrepareToStop()
Declaration
public override void PrepareToStop()
Overrides
SwitchState(ISmState)
Declaration
public virtual void SwitchState(ISmState newState)
Parameters
SwitchState(int)
Declaration
public virtual ISmState SwitchState(int stateIndex)
Parameters
| Type |
Name |
Description |
| int |
stateIndex |
|
Returns
SwitchState<TState>()
Declaration
public virtual TState SwitchState<TState>() where TState : ISmState
Returns
Type Parameters
SwitchState<TState, TContext>(TState, TContext)
Declaration
public virtual void SwitchState<TState, TContext>(TState newState, TContext context) where TState : ISmStateWithContext<TContext>
Parameters
| Type |
Name |
Description |
| TState |
newState |
|
| TContext |
context |
|
Type Parameters
| Name |
Description |
| TState |
|
| TContext |
|
SwitchState<TState, TContext>(TContext)
Declaration
public virtual TState SwitchState<TState, TContext>(TContext context) where TState : ISmStateWithContext<TContext>
Parameters
| Type |
Name |
Description |
| TContext |
context |
|
Returns
Type Parameters
| Name |
Description |
| TState |
|
| TContext |
|
Tick()
Declaration
public override void Tick()
Overrides
Implements
Extension Methods