Table of Contents

Interface IHsm<T, THsm, TState, TInputs>

Namespace
MarymoorStudios.Core.Fsm
Assembly
MarymoorStudios.Core.Fsm.dll

Defines required constraints for Hierarchical State Machines.

public interface IHsm<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.

Methods

Create(T, Action<HsmMeta<T, THsm, TState, TInputs>, TInputs, T>)

Creates a new context.

public static abstract THsm Create(T data, Action<HsmMeta<T, THsm, TState, TInputs>, TInputs, T> builder)

Parameters

data T
builder Action<HsmMeta<T, THsm, TState, TInputs>, TInputs, T>

Returns

THsm

OnError(T, TState, ErrorScope, Exception)

Error input.

void OnError(T data, TState state, ErrorScope scope, Exception ex)

Parameters

data T

The data.

state TState

The state the error occurred in.

scope ErrorScope

The scope where the error occurred.

ex Exception

The error.