Summary
A
Animancer.FSM.StateMachine`1 with a Animancer.FSM.StateMachine`1.WithDefault.DefaultState.- Assembly
- Animancer
.dll - Namespace
- Animancer
.FSM - Interfaces
- Base Types
-
- Object
- StateMachine
<TState>
- Derived Types
graph BT
Type-->Base0["StateMachine<TState>"]
click Base0 "/animancer/api/Animancer.FSM/StateMachine_1"
Base0-->Base1["Object"]
Type-.->Interface0["IStateMachine"]
click Interface0 "/animancer/api/Animancer.FSM/IStateMachine"
Type["StateMachine<TState>.WithDefault"]
class Type type-node
Derived0["CharacterState.StateMachine"]-->Type
click Derived0 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/StateMachine"
Syntax
[Serializable]
public class StateMachine<TState>.WithDefault : StateMachine<TState>, IStateMachine
Remarks
See
Animancer.FSM.StateMachine`1.WithDefault.InitializeAfterDeserialize if using this class in a serialized field.
Documentation:
Default States
Attributes
| Type | Description |
|---|---|
| Serializable |
Constructors
| Name | Summary |
|---|---|
| WithDefault |
Creates a new Animancer.FSM.StateMachine`1.WithDefault. |
| WithDefault |
Creates a new Animancer.FSM.StateMachine`1.WithDefault and sets the Animancer.FSM.StateMachine`1.WithDefault.DefaultState. |
Fields
| Name | Constant Value | Summary |
|---|---|---|
| ForceSetDefaultState |
Calls
Animancer.FSM.StateMachine`1.ForceSetState(`0) with the Animancer.FSM.StateMachine`1.WithDefault.DefaultState. |
Properties
| Name | Value | Summary |
|---|---|---|
| AllowNullStates | bool |
[Assert-Only] Should the
Animancer.FSM.StateMachine`1.CurrentState be allowed to be set to null? Default is false.Inherited from StateMachine
|
| CurrentState | TState |
[
UnityEngine.SerializeField] The currently active state.Inherited from StateMachine
|
| DefaultState | TState |
The starting state and main state to return to when nothing else is active.
|
| GUILineCount | int |
[Editor-Only] The number of standard size lines that
Animancer.FSM.StateMachine`1.DoGUI will use. |
| NextState | TState |
The
Animancer.FSM.StateChange`1.NextState.Inherited from StateMachine
|
| PreviousState | TState |
The
Animancer.FSM.StateChange`1.PreviousState.Inherited from StateMachine
|
Methods
| Name | Value | Summary |
|---|---|---|
| CanSetState |
TState |
Returns the first of the `states` which can currently be entered.
Inherited from StateMachine
|
| CanSetState |
bool |
Is it currently possible to enter the specified `state`?
Inherited from StateMachine
|
| DoGUI |
void |
[Editor-Only] Draws GUI fields to display the status of this state machine.
Inherited from StateMachine
|
| 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.StateMachine`1.CurrentState then changes it to the
specified `state` and calls Animancer.FSM.IState.OnEnterState on it.
Inherited from StateMachine
|
| Initialize |
void |
Call this after deserializing to properly initialize the
Animancer.FSM.StateMachine`1.CurrentState. |
| SetAllowNullStates |
void |
[Assert-Conditional] Sets
Animancer.FSM.StateMachine`1.AllowNullStates.Inherited from StateMachine
|
| ToString |
string |
Returns a string describing the type of this state machine and its
Animancer.FSM.StateMachine`1.CurrentState.Inherited from StateMachine
|
| TryResetDefaultState |
bool |
Attempts to enter the
Animancer.FSM.StateMachine`1.WithDefault.DefaultState and returns true if successful. |
| TryResetState |
bool |
Attempts to enter any of the specified `states` and returns true if successful.
Inherited from StateMachine
|
| TryResetState |
bool |
Attempts to enter the specified `state` and returns true if successful.
Inherited from StateMachine
|
| TrySetDefaultState |
bool |
Attempts to enter the
Animancer.FSM.StateMachine`1.WithDefault.DefaultState and returns true if successful. |
| TrySetState |
bool |
Attempts to enter any of the specified `states` and returns true if successful.
Inherited from StateMachine
|
| TrySetState |
bool |
Attempts to enter the specified `state` and returns true if successful.
Inherited from StateMachine
|