Summary
A
Animancer.FSM.StateMachine`2
with a Animancer.FSM.StateMachine`2.WithDefault.DefaultKey
.- Assembly
- Animancer
.dll - Namespace
- Animancer
.FSM - Interfaces
-
- IStateMachine
- IKeyedStateMachine
<TKey> - IDictionary
<TKey, TState>
- Base Types
-
- Object
- StateMachine
<TState> - StateMachine
<TKey, TState>
graph BT
Type-->Base0["StateMachine<TKey, TState>"]
click Base0 "/animancer-v7-4/api/Animancer.FSM/StateMachine_2"
Base0-->Base1["StateMachine<TState>"]
Base1-->Base2["Object"]
Type-.->Interface0["IStateMachine"]
click Interface0 "/animancer-v7-4/api/Animancer.FSM/IStateMachine"
Type-.->Interface1["IKeyedStateMachine<TKey>"]
Type-.->Interface2["IDictionary<TKey, TState>"]
Type["StateMachine<TKey, TState>.WithDefault"]
class Type type-node
Syntax
[Serializable]
public class StateMachine<TKey, TState>.WithDefault : StateMachine<TKey, TState>, IStateMachine,
IKeyedStateMachine<TKey>, IDictionary<TKey, TState>
Remarks
See
Animancer.FSM.StateMachine`2.WithDefault.InitializeAfterDeserialize
if using this class in a serialized field.
Documentation: Default States
Attributes
Type | Description |
---|---|
Serializable |
Constructors
Name | Summary |
---|---|
WithDefault |
Creates a new Animancer.FSM.StateMachine`2.WithDefault . |
WithDefault |
Creates a new Animancer.FSM.StateMachine`2.WithDefault and sets the Animancer.FSM.StateMachine`2.WithDefault.DefaultKey . |
Fields
Name | Constant Value | Summary |
---|---|---|
ForceSetDefaultState |
Calls
Animancer.FSM.StateMachine`2.ForceSetState(`0) with the Animancer.FSM.StateMachine`2.WithDefault.DefaultKey . |
Properties
Name | Value | Summary |
---|---|---|
Count | int |
Gets the number of states contained in the
Animancer.FSM.StateMachine`2.Dictionary .Inherited from StateMachine
|
CurrentKey | TKey |
The key which identifies the
Animancer.FSM.StateMachine`1.CurrentState .Inherited from StateMachine
|
DefaultKey | TKey |
The starting state and main state to return to when nothing else is active.
|
Dictionary | IDictionary |
The collection of states mapped to a particular key.
Inherited from StateMachine
|
GUILineCount | int | |
Keys | ICollection |
Gets an
System.Collections.Generic.ICollection`1 containing the keys of the Animancer.FSM.StateMachine`2.Dictionary .Inherited from StateMachine
|
NextKey | TKey |
The
Animancer.FSM.KeyChange`1.NextKey .Inherited from StateMachine
|
PreviousKey | TKey |
The
Animancer.FSM.KeyChange`1.PreviousKey .Inherited from StateMachine
|
this[TKey] | TState |
The state registered with the `key` in the
Animancer.FSM.StateMachine`2.Dictionary .Inherited from StateMachine
|
Values | ICollection |
Gets an
System.Collections.Generic.ICollection`1 containing the state of the Animancer.FSM.StateMachine`2.Dictionary .Inherited from StateMachine
|
Methods
Name | Value | Summary |
---|---|---|
Add |
void |
Adds a state to the
Animancer.FSM.StateMachine`2.Dictionary .Inherited from StateMachine
|
Add |
void |
Adds a state to the
Animancer.FSM.StateMachine`2.Dictionary .Inherited from StateMachine
|
AddRange |
void |
Adds the specified `keys` and `states`. Both arrays must be the same size.
Inherited from StateMachine
|
Clear |
void |
Removes all state from the
Animancer.FSM.StateMachine`2.Dictionary .Inherited from StateMachine
|
Contains |
bool |
Determines whether the
Animancer.FSM.StateMachine`2.Dictionary contains a specific value.Inherited from StateMachine
|
ContainsKey |
bool |
Determines whether the
Animancer.FSM.StateMachine`2.Dictionary contains a state with the specified `key`.Inherited from StateMachine
|
CopyTo |
void |
Copies the contents of the
Animancer.FSM.StateMachine`2.Dictionary to the `array` starting at the `arrayIndex`.Inherited from StateMachine
|
DoGUI |
void | |
ForceSetState |
TState |
Uses
Animancer.FSM.StateMachine`2.ForceSetState(`0,`1) to change to the state registered with the `key`. If nothing
is registered, it use null and will throw an exception unless
Animancer.FSM.StateMachine`1.AllowNullStates is enabled.
Inherited from StateMachine
|
ForceSetState |
void |
Calls
Animancer.FSM.IState.OnExitState on the Animancer.FSM.StateMachine`1.CurrentState then changes
to the specified `key` and `state` and calls Animancer.FSM.IState.OnEnterState on it.
Inherited from StateMachine
|
GetEnumerator |
IEnumerator |
Returns an enumerator that iterates through the
Animancer.FSM.StateMachine`2.Dictionary .Inherited from StateMachine
|
GetState |
TState |
Returns the state registered with the specified `key`, or null if none is present.
Inherited from StateMachine
|
Initialize |
void | |
Remove |
bool |
Removes a state from the
Animancer.FSM.StateMachine`2.Dictionary .Inherited from StateMachine
|
Remove |
bool |
Removes a state from the
Animancer.FSM.StateMachine`2.Dictionary .Inherited from StateMachine
|
SetFakeKey |
void |
Sets the
Animancer.FSM.StateMachine`2.CurrentKey without changing the Animancer.FSM.StateMachine`1.CurrentState .
Inherited from StateMachine
|
ToString |
string |
Returns a string describing the type of this state machine and its
Animancer.FSM.StateMachine`2.CurrentKey and
Animancer.FSM.StateMachine`1.CurrentState .
Inherited from StateMachine
|
TryGetValue |
bool |
Gets the state registered with the specified `key` in the
Animancer.FSM.StateMachine`2.Dictionary .Inherited from StateMachine
|
TryResetDefaultState |
TState |
Attempts to enter the
Animancer.FSM.StateMachine`2.WithDefault.DefaultKey and returns true if successful. |
TryResetState |
TState |
Attempts to enter the state registered with the specified `key` and returns it if successful.
Inherited from StateMachine
|
TryResetState |
bool |
Attempts to enter the specified `state` and returns true if successful.
Inherited from StateMachine
|
TrySetDefaultState |
TState |
Attempts to enter the
Animancer.FSM.StateMachine`2.WithDefault.DefaultKey and returns true if successful. |
TrySetState |
TState |
Attempts to enter the state registered with the specified `key` and returns it if successful.
Inherited from StateMachine
|
TrySetState |
bool |
Attempts to enter the specified `state` and returns true if successful.
Inherited from StateMachine
|