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["DieState"]-.->Type click Implementing0 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/DieState" Implementing1["CharacterState"]-.->Type click Implementing1 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/CharacterState" Implementing2["IdleState"]-.->Type click Implementing2 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/IdleState" Implementing3["LandingState"]-.->Type click Implementing3 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/LandingState" Implementing4["RespawnState"]-.->Type click Implementing4 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/RespawnState" Implementing5["LocomotionState"]-.->Type click Implementing5 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/LocomotionState" Implementing6["AirborneState"]-.->Type click Implementing6 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/AirborneState" Implementing7["AttackState"]-.->Type click Implementing7 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/AttackState" Implementing8["FlinchState"]-.->Type click Implementing8 "/animancer/api/Animancer.Samples.AnimatorControllers.GameKit/FlinchState"

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.