All constructors have an optional final argument for how many seconds to wait between executions.
Setting a condition
A task can be provided a condition predicate to limit it's execution.
If provided, a task will only execute and count an execution when both the time condition is met, and the custom condition is met.
task.SetCondition(() => { do things; return true or false; });
Nebula Tasks
Creating a new task
One time task that runs on the next frame:
Task that repeats 5 times, once every 2 seconds:
Task that repeats indefinitely until cancelled:
All constructors have an optional final argument for how many seconds to wait between executions.
Setting a condition
A task can be provided a condition predicate to limit it's execution. If provided, a task will only execute and count an execution when both the time condition is met, and the custom condition is met.
Example