RepeatingTask

new RepeatingTask(before, during, after, runOnAdd, delay, count)

Create a new repeating task.
Parameters:
NameTypeDescription
beforefunctionFunction to run upon adding to the task manager
duringfunctionFunction to run during each completion of the timer
afterfunctionFunction to run after full completion
runOnAddbooleanWhether to run the "during" function upon adding to the task manager
delaynumberDelay between firing the "during" function
countnumberAmount of times to wait and fire

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