Returns the number of times this Delay has looped.
The number of times this Delay has looped.
Returns the maximum delta value, or -1 if none was defined.
The maximum delta value.
Returns the minimum delta value, or -1 if none was defined.
The minimum delta value.
Returns the remaining time on this delay.
The remaining time on this delay.
Returns how far along we are in this delay, in the range 0 - 1.
How far along we are in this delay.
Returns whether this Delay has completed.
Whether this Delay has completed.
Causes this delay to trigger with a little random variance.
The minimum possible variance, inclusive.
The maximum possible variance, exclusive.
Should be called in the update() method of the current game state to update this Delay.
The time that has elapsed since the last call to this method.
Generated using TypeDoc
A way to keep track of a delay. Useful when you want some event to occur every X milliseconds, for example.
Arguments to this delay.
The number of milliseconds between events. You can specify an array of numbers to have the even trigger at non-equal intervals.
If specified, a minimum amount of variance for the event. May be negative, but should be larger than the smallest value specified in millis.
If specified, a maximum amount of variance for the event.
If specified and
true
, this timer will automatically repeat andisDone()
will never returntrue
.This argument is only honored if
args.loop
is defined andtrue
. If true, this argument is the number of times to loop; if this argument is not specified, looping will occur indefinitely.If specified, a callback function that will be called when this delay fires.