DelayedCall Class
A class for delaying a call through the OS, instead of relying on setInterval() or setTimeout().
Constructor
DelayedCall
(
-
callback
-
delay
-
repeat=false
-
autoDestroy=true
Parameters:
Item Index
Methods
_update
(
private
-
elapsed
The callback supplied to the OS for an update each frame.
Parameters:
-
elapsed
IntThe time elapsed since the previous frame.
destroy
()
public
Stops and cleans up the DelayedCall. Do not use it after calling destroy().
restart
()
public
Restarts the DelayedCall, whether it is running or not.
stop
()
public
Stops the DelayedCall, without destroying it.
Properties
_autoDestroy
Boolean
private
If the DelayedCall should destroy itself after completing
Default: true
_delay
Int
private
The delay time, in milliseconds.
_timer
Int
private
The timer counting down from _delay, in milliseconds.