IState Interface

Summary

A state that can be used in a Animancer.FSM.StateMachine`1.
graph BT Type["IState"] class Type type-node Implementing0["IPrioritizable"]-.->Type click Implementing0 "/animancer/api/Animancer.FSM/IPrioritizable" Implementing1["DieState"]-.->Type click Implementing1 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/DieState" Implementing2["IdleState"]-.->Type click Implementing2 "/animancer/api/Animancer.Samples.StateMachines/IdleState" Implementing3["CharacterState"]-.->Type click Implementing3 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/CharacterState" Implementing4["State"]-.->Type click Implementing4 "/animancer/api/Animancer.FSM/State" Implementing5["IdleState"]-.->Type click Implementing5 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/IdleState" Implementing6["FlinchState"]-.->Type click Implementing6 "/animancer/api/Animancer.Samples.StateMachines/FlinchState" Implementing7["LandingState"]-.->Type click Implementing7 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/LandingState" Implementing8["RespawnState"]-.->Type click Implementing8 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/RespawnState" Implementing9["LocomotionState"]-.->Type click Implementing9 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/LocomotionState" Implementing10["MoveState"]-.->Type click Implementing10 "/animancer/api/Animancer.Samples.StateMachines/MoveState" Implementing11["AirborneState"]-.->Type click Implementing11 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/AirborneState" Implementing12["AttackState"]-.->Type click Implementing12 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/AttackState" Implementing13["DelegateState"]-.->Type click Implementing13 "/animancer/api/Animancer.FSM/DelegateState" Implementing14["IOwnedState<TState>"]-.->Type click Implementing14 "/animancer/api/Animancer.FSM/IOwnedState_1" Implementing15["FlinchState"]-.->Type click Implementing15 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/FlinchState" Implementing16["StateBehaviour"]-.->Type click Implementing16 "/animancer/api/Animancer.FSM/StateBehaviour" Implementing17["ActionState"]-.->Type click Implementing17 "/animancer/api/Animancer.Samples.StateMachines/ActionState" Implementing18["EquipState"]-.->Type click Implementing18 "/animancer/api/Animancer.Samples.StateMachines/EquipState" Implementing19["AttackState"]-.->Type click Implementing19 "/animancer/api/Animancer.Samples.StateMachines/AttackState" Implementing20["CharacterState"]-.->Type click Implementing20 "/animancer/api/Animancer.Samples.StateMachines/CharacterState"

Syntax

public interface IState

Remarks

The Animancer.FSM.StateExtensions class contains various extension methods for this interface.

Documentation: Finite State Machines

Properties

Name Value Summary
CanEnterState bool
Can this state be entered?
CanExitState bool
Can this state be exited?

Methods

Name Value Summary
OnEnterState() void
Called when this state is entered.
OnExitState() void
Called when this state is exited.

Extension Methods

Name Value Summary
GetNextState<IState>() TState
[Animancer Extension] Returns the Animancer.FSM.StateChange`1.NextState.
GetPreviousState<IState>() TState
[Animancer Extension] Returns the Animancer.FSM.StateChange`1.PreviousState.