JUtils
A unity utilities library
|
A simple state that can be driven by stateMachine More...
Protected Member Functions | |
void | Deactivate () |
Deactivate this state and make the state-machine continue its queue More... | |
abstract void | OnActivate () |
Gets called when the state activates More... | |
abstract void | OnDeactivate () |
Gets called when the sate deactivates More... | |
StateRef< T > | Ref< T > () |
Used for making typed argument adding to states prettier More... | |
virtual void | ActiveUpdate () |
Only runs the Update() function when the state is active More... | |
virtual void | Awake () |
virtual void | Update () |
override void | OnActivate () |
abstract void | OnActivate (T param) |
override void | OnActivate () |
abstract void | OnActivate (T1 param1, T2 param2) |
override void | OnActivate () |
abstract void | OnActivate (T1 param1, T2 param2, T3 param3) |
Properties | |
bool | isActive [get] |
bool | isActivating [get] |
Is set to true while the state is activating More... | |
bool | isDeactivating [get] |
Is set to true while the state is deactivating More... | |
StateMachine | stateMachine [get, set] |
The reference of this state's state machine More... | |
float | timeInState [get] |
Get the amount of seconds that this state is active. Returns 0 if the state is not active More... | |
float | unscaledTimeInState [get] |
Get the amount of unscaled seconds that this state is active. Returns 0 if the state is not active More... | |
StateData | stateData [get] |
Events | |
Action< State > | onStateActivate |
Action< State > | onStateDeactivate |
A simple state that can be driven by stateMachine
State with 3 type-safe arguments
State with 2 type-safe arguments
State with 1 type-safe arguments
|
inlineprotectedvirtual |
Only runs the Update() function when the state is active
|
inlineprotectedvirtual |
Reimplemented in JUtils.StateMachine.
References JUtils.State< T1, T2, T3 >.isActive.
|
inlineprotected |
Deactivate this state and make the state-machine continue its queue
References JUtils.StateMachine.ContinueQueue(), JUtils.State< T1, T2, T3 >.isActive, and JUtils.State< T1, T2, T3 >.stateMachine.
|
protectedpure virtual |
Gets called when the state activates
|
inlineprotected |
References JUtils.State< T1, T2, T3 >.OnActivate(), and JUtils.State< T1, T2, T3 >.stateData.
|
inlineprotected |
References JUtils.State< T1, T2, T3 >.OnActivate(), and JUtils.State< T1, T2, T3 >.stateData.
|
inlineprotected |
References JUtils.State< T1, T2, T3 >.OnActivate(), and JUtils.State< T1, T2, T3 >.stateData.
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
Gets called when the sate deactivates
|
inlineprotected |
Used for making typed argument adding to states prettier
T | The type we want the ref from |
>
T | : | State |
|
inlineprotectedvirtual |
References JUtils.State< T1, T2, T3 >.ActiveUpdate(), and JUtils.State< T1, T2, T3 >.isActive.
|
get |
Is set to true while the state is activating
|
get |
|
get |
Is set to true while the state is deactivating
|
getprotected |
|
getset |
The reference of this state's state machine
|
get |
Get the amount of seconds that this state is active. Returns 0 if the state is not active
|
get |
Get the amount of unscaled seconds that this state is active. Returns 0 if the state is not active
Action<State> JUtils.State< T1, T2, T3 >.onStateActivate |
Action<State> JUtils.State< T1, T2, T3 >.onStateDeactivate |