Task

Abstract task for use in TaskManager. Do not use without extending.

Constructor

(abstract) new Task()

Create a new abstract task.

Methods

init()

Initialize the task.

isDone() → {boolean}

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

stop()

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

update(elapsed)

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