DelegateState<TState> Class

Summary

A state that uses delegates to define its behaviour in the Animancer.FSM.StateMachine`1.
Assembly
Animancer.dll
Namespace
Animancer.FSM
Interfaces
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["IState<TState>"] Type["DelegateState<TState>"] class Type type-node

Syntax

public class DelegateState<TState> : IState<TState> where TState : class, IState<TState>

Type Parameters

Name Description
TState

Constructors

Name Summary
DelegateState(Func<TState, bool>, Func<TState, bool>, Action, Action) Constructs a new Animancer.FSM.DelegateState`1 with the provided delegates.

Fields

Name Constant Value Summary
canEnter
Determines whether this state can be entered. Null is treated as returning true.
canExit
Determines whether this state can be exited. Null is treated as returning true.
onEnter
Called when this state is entered.
onExit
Called when this state is exited.