DelayedTask

new DelayedTask(func, delay)

Create a new delayed task.
Parameters:
NameTypeDefaultDescription
funcfunctionFunction to run after timer has run out
delaynumber0Amount of time to wait before running (delay)

Extends

Methods

init()

Initialize the task.
Overrides

isDone() → {boolean}

Check if the task is complete and can be removed.
Overrides
Returns:
Whether the task has completed
Type: 
boolean

stop()

Set the task's status to done so it will be removed.
Overrides

update(elapsed)

Update the task.
Parameters:
NameTypeDescription
elapsednumberTime since last update cycle in seconds
Overrides