Scheduler Class Reference

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:
targetThe target node for the scheduled function.
funcThe scheduled function.
intervalPeriod at which the function should be called (in seconds). Zero means "everyframe".
pausedSet 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:
targetThe target node.
priorityPriority of the Update function in the scheduler.
pausedThe scheduler paused stated for that node.
void Unschedule ( Node  target,
DSchedulerFunc  func 
)

Remove a function from the scheduler.

Parameters:
targetThe target node for the removed function.
funcThe function to remove.