Table of Contents

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

T

The data class for the state machine.

THsm

The class for the state machine itself.

TState

The base-type for all states in the machine.

TInputs

The class that defines inputs to the machine.

Inheritance
Hsm<T, THsm, TState, TInputs>
Derived
Inherited Members

Constructors

Hsm(T)

protected Hsm(T data)

Parameters

data T

Properties

CurrentState

public TState CurrentState { get; }

Property Value

TState

IsExecuting

protected bool IsExecuting { get; }

Property Value

bool

Methods

AppendPending(Action)

protected void AppendPending(Action action)

Parameters

action Action

ApplyStateChanges(T)

protected void ApplyStateChanges(T data)

Parameters

data T

HandlePending()

protected void HandlePending()

SetInput(HsmInputMeta?)

protected void SetInput(HsmInputMeta? input)

Parameters

input HsmInputMeta

SetNext(TState)

public void SetNext(TState next)

Parameters

next TState