IOwnedState<TState> Interface

Summary

An Animancer.FSM.IState that knows which Animancer.FSM.StateMachine`1 it is used in.
graph BT Type-.->Interface0["IState"] click Interface0 "/animancer/api/Animancer.FSM/IState" Type["IOwnedState<TState>"] class Type type-node Implementing0["RespawnState"]-.->Type click Implementing0 "/animancer/api/Animancer.Examples.AnimatorControllers.GameKit/RespawnState" Implementing1["LocomotionState"]-.->Type click Implementing1 "/animancer/api/Animancer.Examples.AnimatorControllers.GameKit/LocomotionState" Implementing2["DieState"]-.->Type click Implementing2 "/animancer/api/Animancer.Examples.AnimatorControllers.GameKit/DieState" Implementing3["AirborneState"]-.->Type click Implementing3 "/animancer/api/Animancer.Examples.AnimatorControllers.GameKit/AirborneState" Implementing4["IdleState"]-.->Type click Implementing4 "/animancer/api/Animancer.Examples.AnimatorControllers.GameKit/IdleState" Implementing5["CharacterState"]-.->Type click Implementing5 "/animancer/api/Animancer.Examples.AnimatorControllers.GameKit/CharacterState" Implementing6["FlinchState"]-.->Type click Implementing6 "/animancer/api/Animancer.Examples.AnimatorControllers.GameKit/FlinchState" Implementing7["LandingState"]-.->Type click Implementing7 "/animancer/api/Animancer.Examples.AnimatorControllers.GameKit/LandingState" Implementing8["AttackState"]-.->Type click Implementing8 "/animancer/api/Animancer.Examples.AnimatorControllers.GameKit/AttackState"

Syntax

public interface IOwnedState<TState> : IState where TState : class, IState

Remarks

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

Documentation: Owned States

Type Parameters

Name Description
TState

Properties

Name Value Summary
OwnerStateMachine StateMachine<TState>
The Animancer.FSM.StateMachine`1 that this state is used in.

Extension Methods

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