The Scheduler is the singleton that manages Node related update functions registered by the user.
More...
List of all members.
Public Member Functions |
void | Schedule (Node target, DSchedulerFunc func, float interval, bool paused, int priority=DefaultPriority) |
| Register a Node function in the scheduler.
|
void | Unschedule (Node target, DSchedulerFunc func) |
| Remove a function from the scheduler.
|
void | UnscheduleAll (Node target) |
| Remove all functions related to a given node from the scheduler.
|
void | UnscheduleAll () |
| Remove all functions from the scheduler.
|
void | ScheduleUpdateForTarget (Node target, int priority, bool paused) |
| Schedule a Node's Update function to be called everyframe.
|
void | UnscheduleUpdateForTarget (Node target) |
| Remove a Node's Update function from the scheduler.
|
void | Dump () |
| Print some debug information, content might vary in the future.
|
Properties |
static Scheduler | Instance [get] |
| The scheduler singleton.
|
Detailed Description
The Scheduler is the singleton that manages Node related update functions registered by the user.
Scheduled functions can be called everyframe, or at user special intervals in seconds. The Scheduler update loop is called inside Director.Update().
Member Function Documentation
void Schedule |
( |
Node |
target, |
|
|
DSchedulerFunc |
func, |
|
|
float |
interval, |
|
|
bool |
paused, |
|
|
int |
priority = DefaultPriority |
|
) |
| |
Register a Node function in the scheduler.
- Parameters:
-
target | The target node for the scheduled function. |
func | The scheduled function. |
interval | Period at which the function should be called (in seconds). Zero means "everyframe". |
paused | Set the scheduler paused state for that node. |
void ScheduleUpdateForTarget |
( |
Node |
target, |
|
|
int |
priority, |
|
|
bool |
paused |
|
) |
| |
Schedule a Node's Update function to be called everyframe.
- Parameters:
-
target | The target node. |
priority | Priority of the Update function in the scheduler. |
paused | The scheduler paused stated for that node. |
void Unschedule |
( |
Node |
target, |
|
|
DSchedulerFunc |
func |
|
) |
| |
Remove a function from the scheduler.
- Parameters:
-
target | The target node for the removed function. |
func | The function to remove. |