Class Hsm<T, THsm, TState, TInputs>
- Namespace
- MarymoorStudios.Core.Fsm
- Assembly
- MarymoorStudios.Core.Fsm.dll
Abstract base class for Hierarchical State Machines.
public abstract class Hsm<T, THsm, TState, TInputs> where THsm : Hsm<T, THsm, TState, TInputs>, IHsm<T, THsm, TState, TInputs> where TState : HsmState<T, THsm, TState, TInputs>, IHsmState<T, THsm, TState, TInputs>
Type Parameters
TThe data class for the state machine.
THsmThe class for the state machine itself.
TStateThe base-type for all states in the machine.
TInputsThe class that defines inputs to the machine.
- Inheritance
-
Hsm<T, THsm, TState, TInputs>
- Derived
- Inherited Members
Constructors
Hsm(T)
protected Hsm(T data)
Parameters
dataT
Properties
CurrentState
public TState CurrentState { get; }
Property Value
- TState
IsExecuting
protected bool IsExecuting { get; }
Property Value
Methods
AppendPending(Action)
protected void AppendPending(Action action)
Parameters
actionAction
ApplyStateChanges(T)
protected void ApplyStateChanges(T data)
Parameters
dataT
HandlePending()
protected void HandlePending()
SetInput(HsmInputMeta?)
protected void SetInput(HsmInputMeta? input)
Parameters
inputHsmInputMeta
SetNext(TState)
public void SetNext(TState next)
Parameters
nextTState