|
Highroad Engine v1.3
|
A class to handle cooldown related properties and their resource consumption over time Remember to initialize it (once) and update it every frame from another class More...
Public Types | |
| enum | CooldownStates { Idle , Consuming , PauseOnEmpty , Refilling } |
| all possible states for the object More... | |
Public Member Functions | |
| virtual void | Initialization () |
| An init method that ensures the object is reset More... | |
| virtual void | Start () |
| Starts consuming the cooldown object if possible More... | |
| virtual bool | Ready () |
| virtual void | Stop () |
| Stops consuming the object More... | |
| virtual void | Update () |
| Processes the object's state machine More... | |
Public Attributes | |
| bool | Unlimited = false |
| if this is true, the cooldown won't do anything More... | |
| float | ConsumptionDuration = 2f |
| the time it takes, in seconds, to consume the object More... | |
| float | PauseOnEmptyDuration = 1f |
| the pause to apply before refilling once the object's been depleted More... | |
| float | RefillDuration = 1f |
| the duration of the refill, in seconds, if uninterrupted More... | |
| bool | CanInterruptRefill = true |
| whether or not the refill can be interrupted by a new Start instruction More... | |
| CooldownStates | CooldownState = CooldownStates.Idle |
| the current state of the object More... | |
| float | CurrentDurationLeft |
| the amount of duration left in the object at any given time More... | |
Protected Attributes | |
| WaitForSeconds | _pauseOnEmptyWFS |
| float | _emptyReachedTimestamp = 0f |
Properties | |
| float | Progress [get] |
A class to handle cooldown related properties and their resource consumption over time Remember to initialize it (once) and update it every frame from another class
|
virtual |
An init method that ensures the object is reset
|
virtual |
|
virtual |
Starts consuming the cooldown object if possible
|
virtual |
Stops consuming the object
|
virtual |
Processes the object's state machine
|
protected |
|
protected |
| bool MoreMountains.Tools.MMCooldown.CanInterruptRefill = true |
whether or not the refill can be interrupted by a new Start instruction
| float MoreMountains.Tools.MMCooldown.ConsumptionDuration = 2f |
the time it takes, in seconds, to consume the object
| CooldownStates MoreMountains.Tools.MMCooldown.CooldownState = CooldownStates.Idle |
the current state of the object
| float MoreMountains.Tools.MMCooldown.CurrentDurationLeft |
the amount of duration left in the object at any given time
| float MoreMountains.Tools.MMCooldown.PauseOnEmptyDuration = 1f |
the pause to apply before refilling once the object's been depleted
| float MoreMountains.Tools.MMCooldown.RefillDuration = 1f |
the duration of the refill, in seconds, if uninterrupted
| bool MoreMountains.Tools.MMCooldown.Unlimited = false |
if this is true, the cooldown won't do anything
|
get |