IKeyedStateMachine<TKey> Interface

Summary

Interface for accessing Animancer.FSM.StateMachine`2 without the TState.
graph BT Type["IKeyedStateMachine<TKey>"] class Type type-node Implementing0["StateMachine<TKey, TState>"]-.->Type click Implementing0 "/animancer/api/Animancer.FSM/StateMachine_2" Implementing1["StateMachine<TKey, TState>.WithDefault"]-.->Type click Implementing1 "/animancer/api/Animancer.FSM/WithDefault"

Syntax

public interface IKeyedStateMachine<TKey>

Remarks

Documentation: Keyed State Machines

Type Parameters

Name Description
TKey

Properties

Name Value Summary
CurrentKey TKey
The key which identifies the Animancer.FSM.StateMachine`1.CurrentState.
NextKey TKey
The Animancer.FSM.KeyChange`1.NextKey.
PreviousKey TKey
The Animancer.FSM.KeyChange`1.PreviousKey.

Methods

Name Value Summary
ForceSetState(TKey) Object
Uses Animancer.FSM.StateMachine`2.ForceSetState(`0,`1) to change to the state registered with the `key`. If nothing is registered, it changes to default(TState).
TryResetState(TKey) Object
Attempts to enter the state registered with the specified `key` and returns it if successful.
TrySetState(TKey) Object
Attempts to enter the state registered with the specified `key` and returns it if successful.