World.addTask

Registers a task.

class World
size_t
addTask
(
void delegate
()
task
,
size_t interval
,
size_t repeat = size_t.max
)

Parameters

task void delegate
()

a delegate of a function that will be called every interval

interval size_t

number of ticks indicating between the calls

repeat size_t

number of times to repeat the task

Return Value

Type: size_t

the new task id that can be used to remove the task

Meta