Class UserToolsStateMachine
Inheritance
UserToolsStateMachine
Assembly: fwt.hexterrains.dll
public class UserToolsStateMachine : SmStateMachine, ISmState, IStateMachine, IDisposable
Constructors
Declaration
public UserToolsStateMachine()
Declaration
protected UserToolsStateMachine(IHexTerrainAPI terrainAPI)
Parameters
Fields
Declaration
protected Dictionary<int, UserToolStateBase> StatesByType
Field Value
Methods
Adds the specified state to the state machine's collection of states.
Declaration
public override void AddState(ISmState state)
Parameters
| Type |
Name |
Description |
| ISmState |
state |
The state to add. Cannot be null.
|
Overrides
Destroys all states and clears the States collection.
Declaration
public virtual void ClearStates()
Declaration
public virtual UserToolStateBase CreateUserToolState<TInitArgs>(TInitArgs args) where TInitArgs : IUserToolStateConfig
Parameters
| Type |
Name |
Description |
| TInitArgs |
args |
|
Returns
Type Parameters
| Name |
Description |
| TInitArgs |
|
Declaration
Declaration
public UserToolStateBase GetStateByUserToolType(int userToolType)
Parameters
| Type |
Name |
Description |
| int |
userToolType |
|
Returns
Declaration
public TState GetState<TState>(int userToolType) where TState : UserToolStateBase
Parameters
| Type |
Name |
Description |
| int |
userToolType |
|
Returns
Type Parameters
Declaration
public virtual void Init(IHexTerrainAPI terrainAPI)
Parameters
Declaration
public virtual void InitState<TInitArgs>(UserToolStateBase state, TInitArgs initArgs)
Parameters
Type Parameters
| Name |
Description |
| TInitArgs |
|
Declaration
public virtual void InitStates(IHexTerrainAPI terrainAPI)
Parameters
Declaration
public virtual void InitStates<TInitArgs>(IEnumerable<TInitArgs> requests) where TInitArgs : IUserToolStateConfig
Parameters
Type Parameters
| Name |
Description |
| TInitArgs |
|
Declaration
public virtual void Init<TInitArgs>(IEnumerable<TInitArgs> requests) where TInitArgs : IUserToolStateConfig
Parameters
Type Parameters
| Name |
Description |
| TInitArgs |
|
Declaration
public virtual void Init<TInitArgs>(IEnumerable<TInitArgs> requests, IHexTerrainAPI terrainAPI) where TInitArgs : IUserToolStateConfig
Parameters
Type Parameters
| Name |
Description |
| TInitArgs |
|
Declaration
public UserToolStateBase SwitchStateByUserToolType(int userToolType)
Parameters
| Type |
Name |
Description |
| int |
userToolType |
|
Returns
Declaration
public TState SwitchState<TState>(int userToolType) where TState : UserToolStateBase
Parameters
| Type |
Name |
Description |
| int |
userToolType |
|
Returns
Type Parameters
Implements
Extension Methods