StateMachine<TState>.

TrySetState(IList<TState>) Method

Summary

Attempts to enter any of the specified `states` and returns true if successful.
Assembly
Animancer.dll
Namespace
Animancer.FSM
Containing Type
StateMachine<TState>

Syntax

public bool TrySetState(IList<TState> states)

Remarks

This method returns true and does nothing else if the Animancer.FSM.StateMachine`1.CurrentState is in the list. To allow directly re-entering the same state, use Animancer.FSM.StateMachine`1.TryResetState(System.Collections.Generic.IList{`0}) instead.

States are checked in ascending order (i.e. from [0] to [states.Count - 1]).

Parameters

Name Type Description
states IList<TState>

Return Value

Type Description
bool