new RepeatingTask(before, during, after, runOnAdd, delay, count)
Create a new repeating task.
Parameters:
Name | Type | Description |
---|---|---|
before | function | Function to run upon adding to the task manager |
during | function | Function to run during each completion of the timer |
after | function | Function to run after full completion |
runOnAdd | boolean | Whether to run the "during" function upon adding to the task manager |
delay | number | Delay between firing the "during" function |
count | number | Amount of times to wait and fire |
Extends
Methods
init()
Initialize the task.
- Overrides
- Source
isDone() → {boolean}
Check if the task is complete and can be removed.
- Overrides
- Source
Returns:
Whether the task has completed
- Type:
- boolean
stop()
Set the task's status to done so it will be removed.
- Overrides
- Source
update(elapsed)
Update the task.
Parameters:
Name | Type | Description |
---|---|---|
elapsed | number | Time since last update cycle in seconds |
- Overrides
- Source