Scheduler is responsible for triggering the scheduled callbacks. More...
#include <CCScheduler.h>
Public Member Functions | |
Scheduler () | |
ctor () | |
virtual | ~Scheduler () |
Destructor. More... | |
float | getTimeScale () |
Gets the time scale of schedule callbacks. More... | |
var | getTimeScale () |
Gets the time scale of schedule callbacks. More... | |
local | getTimeScale () |
Gets the time scale of schedule callbacks. More... | |
void | setTimeScale (float timeScale) |
Modifies the time of all scheduled callbacks. More... | |
local | setTimeScale ( local timeScale) |
Modifies the time of all scheduled callbacks. More... | |
void | update (float dt) |
'update' the scheduler. More... | |
void | schedule (const ccSchedulerFunc &callback, void *target, float interval, unsigned int repeat, float delay, bool paused, const std::string &key) |
The scheduled method will be called every 'interval' seconds. More... | |
local | schedule ( local callback, local target, local interval, local repeat, local delay, local paused, local key) |
The scheduled method will be called every 'interval' seconds. More... | |
void | schedule (const ccSchedulerFunc &callback, void *target, float interval, bool paused, const std::string &key) |
The scheduled method will be called every 'interval' seconds for ever. More... | |
local | schedule ( local callback, local target, local interval, local paused, local key) |
The scheduled method will be called every 'interval' seconds for ever. More... | |
void | schedule (SEL_SCHEDULE selector, Ref *target, float interval, unsigned int repeat, float delay, bool paused) |
The scheduled method will be called every interval seconds. More... | |
var | schedule ( var selector, var target, var interval, var repeat, var delay, var paused) |
The scheduled method will be called every interval seconds. More... | |
local | schedule ( local selector, local target, local interval, local repeat, local delay, local paused) |
The scheduled method will be called every interval seconds. More... | |
void | schedule (SEL_SCHEDULE selector, Ref *target, float interval, bool paused) |
The scheduled method will be called every interval seconds for ever. More... | |
template<class T > | |
void | scheduleUpdate (T *target, int priority, bool paused) |
Schedules the 'update' selector for a given target with a given priority. More... | |
void | unschedule (const std::string &key, void *target) |
Unschedules a callback for a key and a given target. More... | |
void | unschedule (SEL_SCHEDULE selector, Ref *target) |
Unschedules a selector for a given target. More... | |
var | unschedule ( var selector, var target) |
Unschedules a selector for a given target. More... | |
local | unschedule ( local selector, local target) |
Unschedules a selector for a given target. More... | |
void | unscheduleUpdate (void *target) |
Unschedules the update selector for a given target. More... | |
var | unscheduleUpdate ( var target) |
Unschedules the update selector for a given target. More... | |
local | unscheduleUpdate ( local target) |
Unschedules the update selector for a given target. More... | |
void | unscheduleAllForTarget (void *target) |
Unschedules all selectors for a given target. More... | |
void | unscheduleAll () |
Unschedules all selectors from all targets. More... | |
var | unscheduleAll () |
Unschedules all selectors from all targets. More... | |
local | unscheduleAll () |
Unschedules all selectors from all targets. More... | |
void | unscheduleAllWithMinPriority (int minPriority) |
Unschedules all selectors from all targets with a minimum priority. More... | |
bool | isScheduled (const std::string &key, void *target) |
Checks whether a callback associated with 'key' and 'target' is scheduled. More... | |
bool | isScheduled (SEL_SCHEDULE selector, Ref *target) |
Checks whether a selector for a given taget is scheduled. More... | |
var | isScheduled ( var selector, var target) |
Checks whether a selector for a given taget is scheduled. More... | |
local | isScheduled ( local selector, local target) |
Checks whether a selector for a given taget is scheduled. More... | |
void | pauseTarget (void *target) |
Pauses the target. More... | |
void | resumeTarget (void *target) |
Resumes the target. More... | |
var | resumeTarget ( var target) |
Resumes the target. More... | |
local | resumeTarget ( local target) |
Resumes the target. More... | |
bool | isTargetPaused (void *target) |
Returns whether or not the target is paused. More... | |
var | isTargetPaused ( var target) |
Returns whether or not the target is paused. More... | |
std::set< void * > | pauseAllTargets () |
Pause all selectors from all targets. More... | |
std::set< void * > | pauseAllTargetsWithMinPriority (int minPriority) |
Pause all selectors from all targets with a minimum priority. More... | |
local | pauseAllTargetsWithMinPriority ( local minPriority) |
Pause all selectors from all targets with a minimum priority. More... | |
void | resumeTargets (const std::set< void * > &targetsToResume) |
Resume selectors on a set of targets. More... | |
void | performFunctionInCocosThread (const std::function< void()> &function) |
Calls a function on the cocos2d thread. More... | |
void | scheduleSelector (SEL_SCHEDULE selector, Ref *target, float interval, unsigned int repeat, float delay, bool paused) |
The scheduled method will be called every 'interval' seconds. More... | |
local | scheduleSelector ( local selector, local target, local interval, local repeat, local delay, local paused) |
The scheduled method will be called every 'interval' seconds. More... | |
void | scheduleSelector (SEL_SCHEDULE selector, Ref *target, float interval, bool paused) |
Calls scheduleSelector with CC_REPEAT_FOREVER and a 0 delay. More... | |
template<class T > | |
void | scheduleUpdateForTarget (T *target, int priority, bool paused) |
Schedules the 'update' selector for a given target with a given priority. More... | |
void | unscheduleSelector (SEL_SCHEDULE selector, Ref *target) |
Unschedule a selector for a given target. More... | |
bool | isScheduledForTarget (Ref *target, SEL_SCHEDULE selector) |
Checks whether a selector for a given taget is scheduled. More... | |
void | unscheduleUpdateForTarget (Ref *target) |
Unschedules the update selector for a given target. More... | |
var | unscheduleUpdateForTarget ( var target) |
Unschedules the update selector for a given target. More... | |
local | unscheduleUpdateForTarget ( local target) |
Unschedules the update selector for a given target. More... | |
![]() | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
Destructor. More... | |
Static Public Attributes | |
static const int | PRIORITY_SYSTEM |
Priority level reserved for system services. More... | |
static const int | PRIORITY_NON_SYSTEM_MIN |
var | PRIORITY_NON_SYSTEM_MIN |
local | PRIORITY_NON_SYSTEM_MIN |
Protected Member Functions | |
void | schedulePerFrame (const ccSchedulerFunc &callback, void *target, int priority, bool paused) |
Schedules the 'callback' function for a given target with a given priority. More... | |
void | removeHashElement (struct _hashSelectorEntry *element) |
var | removeHashElement ( var element) |
local | removeHashElement ( local element) |
void | removeUpdateFromHash (struct _listEntry *entry) |
var | removeUpdateFromHash ( var entry) |
local | removeUpdateFromHash ( local entry) |
void | priorityIn (struct _listEntry **list, const ccSchedulerFunc &callback, void *target, int priority, bool paused) |
var | priorityIn ( var list, var callback, var target, var priority, var paused) |
local | priorityIn ( local list, local callback, local target, local priority, local paused) |
void | appendIn (struct _listEntry **list, const ccSchedulerFunc &callback, void *target, bool paused) |
![]() | |
Ref () | |
Constructor. More... | |
Ref () | |
Constructor. More... | |
Protected Attributes | |
float | _timeScale |
struct _listEntry * | _updatesNegList |
var | _updatesNegList |
local | _updatesNegList |
struct _listEntry * | _updates0List |
var | _updates0List |
local | _updates0List |
struct _listEntry * | _updatesPosList |
var | _updatesPosList |
local | _updatesPosList |
struct _hashUpdateEntry * | _hashForUpdates |
var | _hashForUpdates |
local | _hashForUpdates |
struct _hashSelectorEntry * | _hashForTimers |
var | _hashForTimers |
local | _hashForTimers |
struct _hashSelectorEntry * | _currentTarget |
var | _currentTarget |
local | _currentTarget |
bool | _currentTargetSalvaged |
var | _currentTargetSalvaged |
local | _currentTargetSalvaged |
bool | _updateHashLocked |
var | _updateHashLocked |
local | _updateHashLocked |
std::vector< std::function < void()> > | _functionsToPerform |
std::mutex | _performMutex |
var | _performMutex |
local | _performMutex |
![]() | |
unsigned int | _referenceCount |
count of references More... | |
local | _referenceCount |
count of references More... | |
Scheduler is responsible for triggering the scheduled callbacks.
You should not use system timer for your game logic. Instead, use this class.
There are 2 different types of callbacks (selectors):
The 'custom selectors' should be avoided when possible. It is faster, and consumes less memory to use the 'update selector'.
Scheduler | ( | ) |
var ctor | ( | ) |
|
virtual |
Destructor.
|
protected |
|
protected |
|
protected |
|
inline |
Gets the time scale of schedule callbacks.
|
inline |
Gets the time scale of schedule callbacks.
|
inline |
Gets the time scale of schedule callbacks.
bool isScheduled | ( | const std::string & | key, |
void * | target | ||
) |
Checks whether a callback associated with 'key' and 'target' is scheduled.
key | The key to identify the callback function, because there is not way to identify a std::function<>. |
target | The target of the callback. |
var isScheduled | ( | var | key, |
var | target | ||
) |
Checks whether a callback associated with 'key' and 'target' is scheduled.
key | The key to identify the callback function, because there is not way to identify a std::function<>. |
target | The target of the callback. |
local isScheduled | ( | local | key, |
local | target | ||
) |
Checks whether a callback associated with 'key' and 'target' is scheduled.
key | The key to identify the callback function, because there is not way to identify a std::function<>. |
target | The target of the callback. |
bool isScheduled | ( | SEL_SCHEDULE | selector, |
Ref * | target | ||
) |
Checks whether a selector for a given taget is scheduled.
selector | The selector to be checked. |
target | The target of the callback. |
var isScheduled | ( | var | selector, |
var | target | ||
) |
Checks whether a selector for a given taget is scheduled.
selector | The selector to be checked. |
target | The target of the callback. |
local isScheduled | ( | local | selector, |
local | target | ||
) |
Checks whether a selector for a given taget is scheduled.
selector | The selector to be checked. |
target | The target of the callback. |
|
inline |
Checks whether a selector for a given taget is scheduled.
|
inline |
Checks whether a selector for a given taget is scheduled.
bool isTargetPaused | ( | void * | target | ) |
Returns whether or not the target is paused.
target | The target to be checked. |
var isTargetPaused | ( | var | target | ) |
Returns whether or not the target is paused.
target | The target to be checked. |
std::set<void*> pauseAllTargets | ( | ) |
Pause all selectors from all targets.
You should NEVER call this method, unless you know what you are doing.
var pauseAllTargets | ( | ) |
Pause all selectors from all targets.
You should NEVER call this method, unless you know what you are doing.
local pauseAllTargets | ( | ) |
Pause all selectors from all targets.
You should NEVER call this method, unless you know what you are doing.
std::set<void*> pauseAllTargetsWithMinPriority |
( | int | minPriority | ) |
Pause all selectors from all targets with a minimum priority.
You should only call this with PRIORITY_NON_SYSTEM_MIN or higher.
minPriority | The minimum priority of selector to be paused. Which means, all selectors which priority is higher than minPriority will be paused. |
var pauseAllTargetsWithMinPriority | ( | var | minPriority | ) |
Pause all selectors from all targets with a minimum priority.
You should only call this with PRIORITY_NON_SYSTEM_MIN or higher.
minPriority | The minimum priority of selector to be paused. Which means, all selectors which priority is higher than minPriority will be paused. |
local pauseAllTargetsWithMinPriority |
( | local | minPriority | ) |
Pause all selectors from all targets with a minimum priority.
You should only call this with PRIORITY_NON_SYSTEM_MIN or higher.
minPriority | The minimum priority of selector to be paused. Which means, all selectors which priority is higher than minPriority will be paused. |
void pauseTarget | ( | void * | target | ) |
Pauses the target.
All scheduled selectors/update for a given target won't be 'ticked' until the target is resumed. If the target is not present, nothing happens.
target | The target to be paused. |
var pauseTarget | ( | var | target | ) |
Pauses the target.
All scheduled selectors/update for a given target won't be 'ticked' until the target is resumed. If the target is not present, nothing happens.
target | The target to be paused. |
local pauseTarget | ( | local | target | ) |
Pauses the target.
All scheduled selectors/update for a given target won't be 'ticked' until the target is resumed. If the target is not present, nothing happens.
target | The target to be paused. |
void performFunctionInCocosThread | ( | const std::function< void()> & | function | ) |
local performFunctionInCocosThread | ( | local | function | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void resumeTarget | ( | void * | target | ) |
Resumes the target.
The 'target' will be unpaused, so all schedule selectors/update will be 'ticked' again. If the target is not present, nothing happens.
target | The target to be resumed. |
var resumeTarget | ( | var | target | ) |
Resumes the target.
The 'target' will be unpaused, so all schedule selectors/update will be 'ticked' again. If the target is not present, nothing happens.
target | The target to be resumed. |
local resumeTarget | ( | local | target | ) |
Resumes the target.
The 'target' will be unpaused, so all schedule selectors/update will be 'ticked' again. If the target is not present, nothing happens.
target | The target to be resumed. |
void resumeTargets | ( | const std::set< void * > & | targetsToResume | ) |
Resume selectors on a set of targets.
This can be useful for undoing a call to pauseAllSelectors.
targetsToResume | The set of targets to be resumed. |
var resumeTargets | ( | var | targetsToResume | ) |
Resume selectors on a set of targets.
This can be useful for undoing a call to pauseAllSelectors.
targetsToResume | The set of targets to be resumed. |
local resumeTargets | ( | local | targetsToResume | ) |
Resume selectors on a set of targets.
This can be useful for undoing a call to pauseAllSelectors.
targetsToResume | The set of targets to be resumed. |
void schedule | ( | const ccSchedulerFunc & | callback, |
void * | target, | ||
float | interval, | ||
unsigned int | repeat, | ||
float | delay, | ||
bool | paused, | ||
const std::string & | key | ||
) |
The scheduled method will be called every 'interval' seconds.
If paused is true, then it won't be called until it is resumed. If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdate' instead. If the 'callback' is already scheduled, then only the interval parameter will be updated without re-scheduling it again. repeat let the action be repeated repeat + 1 times, use CC_REPEAT_FOREVER to let the action run continuously delay is the amount of time the action will wait before it'll start.
callback | The callback function. |
target | The target of the callback function. |
interval | The interval to schedule the callback. If the value is 0, then the callback will be scheduled every frame. |
repeat | repeat+1 times to schedule the callback. |
delay | Schedule call back after delay seconds. If the value is not 0, the first schedule will happen after delay seconds. But it will only affect first schedule. After first schedule, the delay time is determined by interval . |
paused | Whether or not to pause the schedule. |
key | The key to identify the callback function, because there is not way to identify a std::function<>. |
var schedule | ( | var | callback, |
var | target, | ||
var | interval, | ||
var | repeat, | ||
var | delay, | ||
var | paused, | ||
var | key | ||
) |
The scheduled method will be called every 'interval' seconds.
If paused is true, then it won't be called until it is resumed. If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdate' instead. If the 'callback' is already scheduled, then only the interval parameter will be updated without re-scheduling it again. repeat let the action be repeated repeat + 1 times, use CC_REPEAT_FOREVER to let the action run continuously delay is the amount of time the action will wait before it'll start.
callback | The callback function. |
target | The target of the callback function. |
interval | The interval to schedule the callback. If the value is 0, then the callback will be scheduled every frame. |
repeat | repeat+1 times to schedule the callback. |
delay | Schedule call back after delay seconds. If the value is not 0, the first schedule will happen after delay seconds. But it will only affect first schedule. After first schedule, the delay time is determined by interval . |
paused | Whether or not to pause the schedule. |
key | The key to identify the callback function, because there is not way to identify a std::function<>. |
local schedule | ( | local | callback, |
local | target, | ||
local | interval, | ||
local | repeat, | ||
local | delay, | ||
local | paused, | ||
local | key | ||
) |
The scheduled method will be called every 'interval' seconds.
If paused is true, then it won't be called until it is resumed. If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdate' instead. If the 'callback' is already scheduled, then only the interval parameter will be updated without re-scheduling it again. repeat let the action be repeated repeat + 1 times, use CC_REPEAT_FOREVER to let the action run continuously delay is the amount of time the action will wait before it'll start.
callback | The callback function. |
target | The target of the callback function. |
interval | The interval to schedule the callback. If the value is 0, then the callback will be scheduled every frame. |
repeat | repeat+1 times to schedule the callback. |
delay | Schedule call back after delay seconds. If the value is not 0, the first schedule will happen after delay seconds. But it will only affect first schedule. After first schedule, the delay time is determined by interval . |
paused | Whether or not to pause the schedule. |
key | The key to identify the callback function, because there is not way to identify a std::function<>. |
void schedule | ( | const ccSchedulerFunc & | callback, |
void * | target, | ||
float | interval, | ||
bool | paused, | ||
const std::string & | key | ||
) |
The scheduled method will be called every 'interval' seconds for ever.
callback | The callback function. |
target | The target of the callback function. |
interval | The interval to schedule the callback. If the value is 0, then the callback will be scheduled every frame. |
paused | Whether or not to pause the schedule. |
key | The key to identify the callback function, because there is not way to identify a std::function<>. |
var schedule | ( | var | callback, |
var | target, | ||
var | interval, | ||
var | paused, | ||
var | key | ||
) |
The scheduled method will be called every 'interval' seconds for ever.
callback | The callback function. |
target | The target of the callback function. |
interval | The interval to schedule the callback. If the value is 0, then the callback will be scheduled every frame. |
paused | Whether or not to pause the schedule. |
key | The key to identify the callback function, because there is not way to identify a std::function<>. |
local schedule | ( | local | callback, |
local | target, | ||
local | interval, | ||
local | paused, | ||
local | key | ||
) |
The scheduled method will be called every 'interval' seconds for ever.
callback | The callback function. |
target | The target of the callback function. |
interval | The interval to schedule the callback. If the value is 0, then the callback will be scheduled every frame. |
paused | Whether or not to pause the schedule. |
key | The key to identify the callback function, because there is not way to identify a std::function<>. |
void schedule | ( | SEL_SCHEDULE | selector, |
Ref * | target, | ||
float | interval, | ||
unsigned int | repeat, | ||
float | delay, | ||
bool | paused | ||
) |
The scheduled method will be called every interval
seconds.
If paused is true, then it won't be called until it is resumed. If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdate' instead. If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again. repeat let the action be repeated repeat + 1 times, use CC_REPEAT_FOREVER to let the action run continuously delay is the amount of time the action will wait before it'll start
selector | The callback function. |
target | The target of the callback function. |
interval | The interval to schedule the callback. If the value is 0, then the callback will be scheduled every frame. |
repeat | repeat+1 times to schedule the callback. |
delay | Schedule call back after delay seconds. If the value is not 0, the first schedule will happen after delay seconds. But it will only affect first schedule. After first schedule, the delay time is determined by interval . |
paused | Whether or not to pause the schedule. |
var schedule | ( | var | selector, |
var | target, | ||
var | interval, | ||
var | repeat, | ||
var | delay, | ||
var | paused | ||
) |
The scheduled method will be called every interval
seconds.
If paused is true, then it won't be called until it is resumed. If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdate' instead. If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again. repeat let the action be repeated repeat + 1 times, use CC_REPEAT_FOREVER to let the action run continuously delay is the amount of time the action will wait before it'll start
selector | The callback function. |
target | The target of the callback function. |
interval | The interval to schedule the callback. If the value is 0, then the callback will be scheduled every frame. |
repeat | repeat+1 times to schedule the callback. |
delay | Schedule call back after delay seconds. If the value is not 0, the first schedule will happen after delay seconds. But it will only affect first schedule. After first schedule, the delay time is determined by interval . |
paused | Whether or not to pause the schedule. |
local schedule | ( | local | selector, |
local | target, | ||
local | interval, | ||
local | repeat, | ||
local | delay, | ||
local | paused | ||
) |
The scheduled method will be called every interval
seconds.
If paused is true, then it won't be called until it is resumed. If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdate' instead. If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again. repeat let the action be repeated repeat + 1 times, use CC_REPEAT_FOREVER to let the action run continuously delay is the amount of time the action will wait before it'll start
selector | The callback function. |
target | The target of the callback function. |
interval | The interval to schedule the callback. If the value is 0, then the callback will be scheduled every frame. |
repeat | repeat+1 times to schedule the callback. |
delay | Schedule call back after delay seconds. If the value is not 0, the first schedule will happen after delay seconds. But it will only affect first schedule. After first schedule, the delay time is determined by interval . |
paused | Whether or not to pause the schedule. |
void schedule | ( | SEL_SCHEDULE | selector, |
Ref * | target, | ||
float | interval, | ||
bool | paused | ||
) |
The scheduled method will be called every interval
seconds for ever.
selector | The callback function. |
target | The target of the callback function. |
interval | The interval to schedule the callback. If the value is 0, then the callback will be scheduled every frame. |
paused | Whether or not to pause the schedule. |
var schedule | ( | var | selector, |
var | target, | ||
var | interval, | ||
var | paused | ||
) |
The scheduled method will be called every interval
seconds for ever.
selector | The callback function. |
target | The target of the callback function. |
interval | The interval to schedule the callback. If the value is 0, then the callback will be scheduled every frame. |
paused | Whether or not to pause the schedule. |
local schedule | ( | local | selector, |
local | target, | ||
local | interval, | ||
local | paused | ||
) |
The scheduled method will be called every interval
seconds for ever.
selector | The callback function. |
target | The target of the callback function. |
interval | The interval to schedule the callback. If the value is 0, then the callback will be scheduled every frame. |
paused | Whether or not to pause the schedule. |
|
protected |
Schedules the 'callback' function for a given target with a given priority.
The 'callback' selector will be called every frame. The lower the priority, the earlier it is called.
|
protected |
Schedules the 'callback' function for a given target with a given priority.
The 'callback' selector will be called every frame. The lower the priority, the earlier it is called.
|
protected |
Schedules the 'callback' function for a given target with a given priority.
The 'callback' selector will be called every frame. The lower the priority, the earlier it is called.
|
inline |
The scheduled method will be called every 'interval' seconds.
If paused is true, then it won't be called until it is resumed. If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdateForTarget:' instead. If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again. repeat let the action be repeated repeat + 1 times, use CC_REPEAT_FOREVER to let the action run continuously delay is the amount of time the action will wait before it'll start
Scheduler::schedule
instead.
|
inline |
The scheduled method will be called every 'interval' seconds.
If paused is true, then it won't be called until it is resumed. If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdateForTarget:' instead. If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again. repeat let the action be repeated repeat + 1 times, use CC_REPEAT_FOREVER to let the action run continuously delay is the amount of time the action will wait before it'll start
Scheduler::schedule
instead.
|
inline |
Calls scheduleSelector with CC_REPEAT_FOREVER and a 0 delay.
Scheduler::schedule
instead.
|
inline |
Calls scheduleSelector with CC_REPEAT_FOREVER and a 0 delay.
Scheduler::schedule
instead.
|
inline |
Schedules the 'update' selector for a given target with a given priority.
The 'update' selector will be called every frame. The lower the priority, the earlier it is called.
|
inline |
Schedules the 'update' selector for a given target with a given priority.
The 'update' selector will be called every frame. The lower the priority, the earlier it is called.
|
inline |
Schedules the 'update' selector for a given target with a given priority.
The 'update' selector will be called every frame. The lower the priority, the earlier it is called.
|
inline |
Schedules the 'update' selector for a given target with a given priority.
The 'update' selector will be called every frame. The lower the priority, the earlier it is called.
|
inline |
Schedules the 'update' selector for a given target with a given priority.
The 'update' selector will be called every frame. The lower the priority, the earlier it is called.
|
inline |
Modifies the time of all scheduled callbacks.
You can use this property to create a 'slow motion' or 'fast forward' effect. Default is 1.0. To create a 'slow motion' effect, use values below 1.0. To create a 'fast forward' effect, use values higher than 1.0.
|
inline |
Modifies the time of all scheduled callbacks.
You can use this property to create a 'slow motion' or 'fast forward' effect. Default is 1.0. To create a 'slow motion' effect, use values below 1.0. To create a 'fast forward' effect, use values higher than 1.0.
|
inline |
Modifies the time of all scheduled callbacks.
You can use this property to create a 'slow motion' or 'fast forward' effect. Default is 1.0. To create a 'slow motion' effect, use values below 1.0. To create a 'fast forward' effect, use values higher than 1.0.
void unschedule | ( | const std::string & | key, |
void * | target | ||
) |
Unschedules a callback for a key and a given target.
If you want to unschedule the 'callbackPerFrame', use unscheduleUpdate.
key | The key to identify the callback function, because there is not way to identify a std::function<>. |
target | The target to be unscheduled. |
var unschedule | ( | var | key, |
var | target | ||
) |
Unschedules a callback for a key and a given target.
If you want to unschedule the 'callbackPerFrame', use unscheduleUpdate.
key | The key to identify the callback function, because there is not way to identify a std::function<>. |
target | The target to be unscheduled. |
local unschedule | ( | local | key, |
local | target | ||
) |
Unschedules a callback for a key and a given target.
If you want to unschedule the 'callbackPerFrame', use unscheduleUpdate.
key | The key to identify the callback function, because there is not way to identify a std::function<>. |
target | The target to be unscheduled. |
void unschedule | ( | SEL_SCHEDULE | selector, |
Ref * | target | ||
) |
Unschedules a selector for a given target.
If you want to unschedule the "update", use unscheudleUpdate()
.
selector | The selector that is unscheduled. |
target | The target of the unscheduled selector. |
var unschedule | ( | var | selector, |
var | target | ||
) |
Unschedules a selector for a given target.
If you want to unschedule the "update", use unscheudleUpdate()
.
selector | The selector that is unscheduled. |
target | The target of the unscheduled selector. |
local unschedule | ( | local | selector, |
local | target | ||
) |
Unschedules a selector for a given target.
If you want to unschedule the "update", use unscheudleUpdate()
.
selector | The selector that is unscheduled. |
target | The target of the unscheduled selector. |
void unscheduleAll | ( | ) |
Unschedules all selectors from all targets.
You should NEVER call this method, unless you know what you are doing.
var unscheduleAll | ( | ) |
Unschedules all selectors from all targets.
You should NEVER call this method, unless you know what you are doing.
local unscheduleAll | ( | ) |
Unschedules all selectors from all targets.
You should NEVER call this method, unless you know what you are doing.
void unscheduleAllForTarget | ( | void * | target | ) |
Unschedules all selectors for a given target.
This also includes the "update" selector.
target | The target to be unscheduled. |
var unscheduleAllForTarget | ( | var | target | ) |
Unschedules all selectors for a given target.
This also includes the "update" selector.
target | The target to be unscheduled. |
void unscheduleAllWithMinPriority | ( | int | minPriority | ) |
Unschedules all selectors from all targets with a minimum priority.
You should only call this with PRIORITY_NON_SYSTEM_MIN
or higher.
minPriority | The minimum priority of selector to be unscheduled. Which means, all selectors which priority is higher than minPriority will be unscheduled. |
var unscheduleAllWithMinPriority | ( | var | minPriority | ) |
Unschedules all selectors from all targets with a minimum priority.
You should only call this with PRIORITY_NON_SYSTEM_MIN
or higher.
minPriority | The minimum priority of selector to be unscheduled. Which means, all selectors which priority is higher than minPriority will be unscheduled. |
local unscheduleAllWithMinPriority | ( | local | minPriority | ) |
Unschedules all selectors from all targets with a minimum priority.
You should only call this with PRIORITY_NON_SYSTEM_MIN
or higher.
minPriority | The minimum priority of selector to be unscheduled. Which means, all selectors which priority is higher than minPriority will be unscheduled. |
|
inline |
Unschedule a selector for a given target.
If you want to unschedule the "update", use unscheudleUpdateForTarget.
|
inline |
Unschedule a selector for a given target.
If you want to unschedule the "update", use unscheudleUpdateForTarget.
void unscheduleUpdate | ( | void * | target | ) |
Unschedules the update selector for a given target.
target | The target to be unscheduled. |
var unscheduleUpdate | ( | var | target | ) |
Unschedules the update selector for a given target.
target | The target to be unscheduled. |
local unscheduleUpdate | ( | local | target | ) |
Unschedules the update selector for a given target.
target | The target to be unscheduled. |
|
inline |
Unschedules the update selector for a given target.
|
inline |
Unschedules the update selector for a given target.
|
inline |
Unschedules the update selector for a given target.
void update | ( | float | dt | ) |
'update' the scheduler.
You should NEVER call this method, unless you know what you are doing.
var update | ( | var | dt | ) |
'update' the scheduler.
You should NEVER call this method, unless you know what you are doing.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
static |
|
static |
Priority level reserved for system services.
|
static |
Priority level reserved for system services.
|
static |
Priority level reserved for system services.