![]() |
BomberUnits
...a Unity learning project
|
Extended functionality for Unity SM Behaviours and makes them complete 'States'. More...
Inheritance diagram for State:
Collaboration diagram for State:Public Member Functions | |
| bool | IsActiveState () |
| Provides a check, whether this state is the current active state in the State Machine. | |
| override void | OnStateMachineEnter (Animator animator, int stateMachinePathHash) |
| Used to set references between SM and states. More... | |
| override void | OnStateEnter (Animator animator, AnimatorStateInfo stateInfo, int layerIndex) |
| Extends the normal OnStateEnter function with state tracking for the containing SM. More... | |
Public Attributes | |
| new string | name |
| Name of the state, to be set exactly as in the Animator View! | |
| List< string > | triggers |
| Names of outgoing transitions allowed for the state, set as in Animator! | |
Protected Member Functions | |
| void | TriggerTransition (string transName, float delay=0.0f) |
| Shortcut to trigger transitions from within this state for this state (i.e. More... | |
| virtual void | Awake () |
| Override to use an Awake function, which is not normally available for StateMachineBehaviours. | |
| virtual void | OnMyStateEnter () |
| Override to use OnStateEnter as extended by this base class. Do not override OnStateEnter! | |
Protected Attributes | |
| StateMachine | sm |
| Reference to the State Machine featuring this behaviour. | |
Extended functionality for Unity SM Behaviours and makes them complete 'States'.
Only one such state is currently allowed per State Box in the Animator Controller!
This is intended to provide safer transitions by enforcing checks for whether a transition is allowed for a certain state. This prevents carry-over or false trigger flags to the next states. To do this:
The base classes offer for inherited behaviours:
|
inline |
|
inline |
|
inlineprotected |