useCooldown
useCooldown(
entity,key):CooldownStatus|undefined
The cooldown entity runs under key, as a view shows it, or
undefined while it runs none. A running cooldown keeps only the tick
it ends on, so the hook reads it again after each step and draws again
as remainingSeconds moves: what an ability’s button shows, drawing
remainingSeconds / seconds of its rim.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
entity |
Entity | null |
key |
string |
Returns
Section titled “Returns”CooldownStatus | undefined