Summary
A simple keyless Finite State Machine system.
- Assembly
- Animancer
.dll - Namespace
- Animancer
.FSM - Implementing Types
graph BT
Type["IStateMachine"]
class Type type-node
Implementing0["StateMachine<TState>"]-.->Type
click Implementing0 "/animancer-v7-4/api/Animancer.FSM/StateMachine_1"
Implementing1["StateMachine<TState>.WithDefault"]-.->Type
click Implementing1 "/animancer-v7-4/api/Animancer.FSM/WithDefault"
Implementing2["StateMachine<TKey, TState>"]-.->Type
click Implementing2 "/animancer-v7-4/api/Animancer.FSM/StateMachine_2"
Implementing3["CharacterState.StateMachine"]-.->Type
click Implementing3 "/animancer-v7-4/api/Animancer.Examples.AnimatorControllers.GameKit/StateMachine"
Implementing4["StateMachine<TKey, TState>.WithDefault"]-.->Type
click Implementing4 "/animancer-v7-4/api/Animancer.FSM/WithDefault"
Implementing5["CharacterState.StateMachine"]-.->Type
click Implementing5 "/animancer-v7-4/api/Animancer.Examples.StateMachines/StateMachine"
Syntax
public interface IStateMachine
Remarks
Documentation: Finite State Machines
Properties
Name | Value | Summary |
---|---|---|
AllowNullStates | bool |
[Assert-Only] Should the
Animancer.FSM.IStateMachine.CurrentState be allowed to be set to null? Default is false. |
CurrentState | Object |
The currently active state.
|
GUILineCount | int |
[Editor-Only] The number of standard size lines that
Animancer.FSM.IStateMachine.DoGUI will use. |
NextState | Object |
The
Animancer.FSM.StateChange`1.NextState . |
PreviousState | Object |
The
Animancer.FSM.StateChange`1.PreviousState . |
Methods
Name | Value | Summary |
---|---|---|
CanSetState |
Object |
Returns the first of the `states` which can currently be entered.
|
CanSetState |
bool |
Is it currently possible to enter the specified `state`?
|
DoGUI |
void |
[Editor-Only] Draws GUI fields to display the status of this state machine.
|
DoGUI |
void |
[Editor-Only] Draws GUI fields to display the status of this state machine in the given `area`.
|
ForceSetState |
void |
Calls
Animancer.FSM.IState.OnExitState on the Animancer.FSM.IStateMachine.CurrentState then changes it to the
specified `state` and calls Animancer.FSM.IState.OnEnterState on it.
|
SetAllowNullStates |
void |
[Assert-Conditional] Sets
Animancer.FSM.IStateMachine.AllowNullStates . |
TryResetState |
bool |
Attempts to enter any of the specified `states` and returns true if successful.
|
TryResetState |
bool |
Attempts to enter the specified `state` and returns true if successful.
|
TrySetState |
bool |
Attempts to enter any of the specified `states` and returns true if successful.
|
TrySetState |
bool |
Attempts to enter the specified `state` and returns true if successful.
|