Base class for a state within a state machine.
More...
|
float | ActiveTime [get] |
| Time in seconds since the state became active.
|
|
float | Weight = 1.0f [get, set] |
| Weight of the state in blending operations. Typically between 0 and 1.
|
|
Base class for a state within a state machine.
◆ DrawGizmos()
virtual void Hexagon.StateMachine.State.DrawGizmos |
( |
| ) |
|
|
inlinevirtual |
Called to draw debug gizmos for the state.
◆ GetMachine< TParent >()
StateMachine< TParent > Hexagon.StateMachine.State.GetMachine< TParent > |
( |
| ) |
|
|
inline |
Returns the owning state machine cast to a specific generic type.
◆ Init() [1/2]
void Hexagon.StateMachine.State.Init |
( |
| ) |
|
|
abstract |
Called during initialization of the state.
◆ Init() [2/2]
virtual void Hexagon.StateMachine.State.Init |
( |
StateMachine | machine | ) |
|
|
inlinevirtual |
Initializes the state with a reference to its owning state machine.
◆ IsMachine< TParent >()
bool Hexagon.StateMachine.State.IsMachine< TParent > |
( |
| ) |
|
|
inline |
Checks if the machine is of a specific generic type.
◆ IsPossibleChangeFrom()
bool Hexagon.StateMachine.State.IsPossibleChangeFrom |
( |
| ) |
|
|
abstract |
Returns whether a transition from this state is allowed.
◆ IsPossibleChangeTo()
bool Hexagon.StateMachine.State.IsPossibleChangeTo |
( |
| ) |
|
|
abstract |
Returns whether a transition to this state is allowed.
◆ OnFixedUpdate()
virtual void Hexagon.StateMachine.State.OnFixedUpdate |
( |
| ) |
|
|
inlinevirtual |
Called once per physics update to update state logic.
◆ OnTransitionFromFinished()
virtual void Hexagon.StateMachine.State.OnTransitionFromFinished |
( |
| ) |
|
|
inlinevirtual |
Called when state becomes the previous state of the State Machine. Weight becomes 0. Transition has ended.
◆ OnTransitionFromStarted()
void Hexagon.StateMachine.State.OnTransitionFromStarted |
( |
| ) |
|
|
abstract |
Called when state starts to lose weight to the target state of the State Machine. Weight becomes 1. Transition has started.
◆ OnTransitionToFinished()
virtual void Hexagon.StateMachine.State.OnTransitionToFinished |
( |
| ) |
|
|
inlinevirtual |
Called when state becomes the current state of the State Machine. Weight becomes 1. Transition has ended.
◆ OnTransitionToStarted()
void Hexagon.StateMachine.State.OnTransitionToStarted |
( |
| ) |
|
|
abstract |
Called when state becomes the target state of the State Machine. Weight becomes 0. Transition has started.
◆ OnUpdate()
void Hexagon.StateMachine.State.OnUpdate |
( |
| ) |
|
|
abstract |
Called once per frame to update state logic.
◆ _machine
Reference to the owning state machine.
◆ _type
int Hexagon.StateMachine.State._type |
Integer identifier for the state.
◆ ActiveTime
float Hexagon.StateMachine.State.ActiveTime |
|
get |
Time in seconds since the state became active.
◆ Weight
float Hexagon.StateMachine.State.Weight = 1.0f |
|
getset |
Weight of the state in blending operations. Typically between 0 and 1.
The documentation for this class was generated from the following file:
- Assets/Hexagon/Core/StateMachine/State.cs