Table of Contents

Method AddState

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

AddState(TLabel, Action, Action, Action)

Adds a state, and the delegates that should run when the state starts, stops, and when the state machine is updated.

Any delegate can be null, and wont be executed.

public void AddState(TLabel label, Action onStart, Action onUpdate, Action onStop)

Parameters

label TLabel

The name of the state to add.

onStart Action

The action performed when the state is entered.

onUpdate Action

The action performed when the state machine is updated in the given state.

onStop Action

The action performed when the state machine is left.

AddState(TLabel, Action, Action)

Adds a state, and the delegates that should run when the state starts, and when the state machine is updated.

Any delegate can be null, and wont be executed.

public void AddState(TLabel label, Action onStart, Action onUpdate)

Parameters

label TLabel

The name of the state to add.

onStart Action

The action performed when the state is entered.

onUpdate Action

The action performed when the state machine is updated in the given state.

AddState(TLabel, Action)

Adds a state, and the delegates that should run when the state starts.

Any delegate can be null, and wont be executed.

public void AddState(TLabel label, Action onStart)

Parameters

label TLabel

The name of the state to add.

onStart Action

The action performed when the state is entered.

AddState(TLabel)

Adds a state.

public void AddState(TLabel label)

Parameters

label TLabel

The name of the state to add.

AddState<TSubStateLabel>(TLabel, StateMachine<TSubStateLabel>, TSubStateLabel)

Adds a sub state machine for the given state.

The sub state machine need not be updated, as long as this state machine is being updated.

[Version(1, 4, 0)]
public void AddState<TSubStateLabel>(TLabel label, StateMachine<TSubStateLabel> subMachine, TSubStateLabel subMachineStartState)

Parameters

label TLabel

The name of the state to add.

subMachine StateMachine<TSubStateLabel>

The sub-machine that will run during the given state.

subMachineStartState TSubStateLabel

The starting state of the sub-machine.

Type Parameters

TSubStateLabel

The type of the sub-machine.