cocos2d-x  3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Scheduler Class Reference

Scheduler is responsible for triggering the scheduled callbacks. More...

#include <CCScheduler.h>

Inheritance diagram for Scheduler:
Ref

Public Member Functions

 Scheduler ()
 ctor ()
 Scheduler ()
virtual ~Scheduler ()
float getTimeScale ()
var getTimeScale ()
local getTimeScale ()
void setTimeScale (float 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)
 Calls scheduleCallback with kRepeatForever and a 0 delay. More...
 
local schedule ( local callback, local target, local interval, local paused, local key)
 Calls scheduleCallback with kRepeatForever and a 0 delay. 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...
 
void schedule (SEL_SCHEDULE selector, Ref *target, float interval, bool paused)
 calls scheduleSelector with kRepeatForever and a 0 delay 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)
 Unschedule a selector for a given target. More...
 
void unscheduleUpdate (void *target)
 Unschedules the update selector for a given target. More...
 
void unscheduleAllForTarget (void *target)
 Unschedules all selectors for a given target. More...
 
var unscheduleCallbackForTarget ( var target)
 Unschedules all selectors for a given target. More...
 
void unscheduleAll (void)
 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...
 
var isScheduled ( var key, var target)
 Checks whether a callback associated with 'key' and 'target' is scheduled. More...
 
local isScheduled ( local key, local 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...
 
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...
 
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...
 
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...
 
local performFunctionInCocosThread ( local 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...
 
var scheduleSelector ( var selector, var target, var interval, var repeat, var delay, var 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 kRepeatForever 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...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()

Static Public Attributes

static const int PRIORITY_SYSTEM
var PRIORITY_SYSTEM
local PRIORITY_SYSTEM
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)
- Protected Member Functions inherited from Ref
 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
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Detailed Description

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):

  • update selector: the 'update' selector will be called every frame. You can customize the priority.
  • custom selector: A custom selector will be called every frame, or with a custom interval of time

The 'custom selectors' should be avoided when possible. It is faster, and consumes less memory to use the 'update selector'.

Constructor & Destructor Documentation

Scheduler ( )
var ctor ( )
local Scheduler ( )
virtual ~Scheduler ( )
virtual

Member Function Documentation

void appendIn ( struct _listEntry **  list,
const ccSchedulerFunc callback,
void *  target,
bool  paused 
)
protected
var appendIn ( var  list,
var  callback,
var  target,
var  paused 
)
protected
local appendIn ( local  list,
local  callback,
local  target,
local  paused 
)
protected
float getTimeScale ( )
inline
var getTimeScale ( )
inline
local getTimeScale ( )
inline
bool isScheduled ( const std::string &  key,
void *  target 
)

Checks whether a callback associated with 'key' and 'target' is scheduled.

Since
v3.0.0
var isScheduled ( var  key,
var  target 
)

Checks whether a callback associated with 'key' and 'target' is scheduled.

Since
v3.0.0
local isScheduled ( local  key,
local  target 
)

Checks whether a callback associated with 'key' and 'target' is scheduled.

Since
v3.0.0
bool isScheduled ( SEL_SCHEDULE  selector,
Ref target 
)

Checks whether a selector for a given taget is scheduled.

Since
v3.0
var isScheduled ( var  selector,
var  target 
)

Checks whether a selector for a given taget is scheduled.

Since
v3.0
local isScheduled ( local  selector,
local  target 
)

Checks whether a selector for a given taget is scheduled.

Since
v3.0
bool isScheduledForTarget ( Ref target,
SEL_SCHEDULE  selector 
)
inline

Checks whether a selector for a given taget is scheduled.

Deprecated:
Please use 'Scheduler::isScheduled' instead.
Since
v0.99.3
var isScheduledForTarget ( var  target,
var  selector 
)
inline

Checks whether a selector for a given taget is scheduled.

Deprecated:
Please use 'Scheduler::isScheduled' instead.
Since
v0.99.3
local isScheduledForTarget ( local  target,
local  selector 
)
inline

Checks whether a selector for a given taget is scheduled.

Deprecated:
Please use 'Scheduler::isScheduled' instead.
Since
v0.99.3
bool isTargetPaused ( void *  target)

Returns whether or not the target is paused.

Since
v1.0.0 In js: var isTargetPaused(var jsObject)
var isTargetPaused ( var  target)

Returns whether or not the target is paused.

Since
v1.0.0 In js: var isTargetPaused(var jsObject)
std::set<void*> pauseAllTargets ( )

Pause all selectors from all targets.

You should NEVER call this method, unless you know what you are doing.

Since
v2.0.0
var pauseAllTargets ( )

Pause all selectors from all targets.

You should NEVER call this method, unless you know what you are doing.

Since
v2.0.0
local pauseAllTargets ( )

Pause all selectors from all targets.

You should NEVER call this method, unless you know what you are doing.

Since
v2.0.0
std::set<void*>
pauseAllTargetsWithMinPriority
( int  minPriority)

Pause all selectors from all targets with a minimum priority.

You should only call this with kPriorityNonSystemMin or higher.

Since
v2.0.0
var pauseAllTargetsWithMinPriority ( var  minPriority)

Pause all selectors from all targets with a minimum priority.

You should only call this with kPriorityNonSystemMin or higher.

Since
v2.0.0
local
pauseAllTargetsWithMinPriority
( local  minPriority)

Pause all selectors from all targets with a minimum priority.

You should only call this with kPriorityNonSystemMin or higher.

Since
v2.0.0
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.

Since
v0.99.3
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.

Since
v0.99.3
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.

Since
v0.99.3
void performFunctionInCocosThread ( const std::function< void()> &  function)

calls a function on the cocos2d thread.

Useful when you need to call a cocos2d function from another thread. This function is thread safe.

Since
v3.0
var performFunctionInCocosThread ( var  function)

calls a function on the cocos2d thread.

Useful when you need to call a cocos2d function from another thread. This function is thread safe.

Since
v3.0
local performFunctionInCocosThread ( local  function)

calls a function on the cocos2d thread.

Useful when you need to call a cocos2d function from another thread. This function is thread safe.

Since
v3.0
void priorityIn ( struct _listEntry **  list,
const ccSchedulerFunc callback,
void *  target,
int  priority,
bool  paused 
)
protected
var priorityIn ( var  list,
var  callback,
var  target,
var  priority,
var  paused 
)
protected
local priorityIn ( local  list,
local  callback,
local  target,
local  priority,
local  paused 
)
protected
void removeHashElement ( struct _hashSelectorEntry *  element)
protected
var removeHashElement ( var  element)
protected
local removeHashElement ( local  element)
protected
void removeUpdateFromHash ( struct _listEntry *  entry)
protected
var removeUpdateFromHash ( var  entry)
protected
local removeUpdateFromHash ( local  entry)
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.

Since
v0.99.3
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.

Since
v0.99.3
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.

Since
v0.99.3
void resumeTargets ( const std::set< void * > &  targetsToResume)

Resume selectors on a set of targets.

This can be useful for undoing a call to pauseAllSelectors.

Since
v2.0.0
var resumeTargets ( var  targetsToResume)

Resume selectors on a set of targets.

This can be useful for undoing a call to pauseAllSelectors.

Since
v2.0.0
local resumeTargets ( local  targetsToResume)

Resume selectors on a set of targets.

This can be useful for undoing a call to pauseAllSelectors.

Since
v2.0.0
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 kRepeatForever to let the action run continuously delay is the amount of time the action will wait before it'll start

Parameters
keyThe key to identify the callback
Since
v3.0
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 kRepeatForever to let the action run continuously delay is the amount of time the action will wait before it'll start

Parameters
keyThe key to identify the callback
Since
v3.0
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 kRepeatForever to let the action run continuously delay is the amount of time the action will wait before it'll start

Parameters
keyThe key to identify the callback
Since
v3.0
void schedule ( const ccSchedulerFunc callback,
void *  target,
float  interval,
bool  paused,
const std::string &  key 
)

Calls scheduleCallback with kRepeatForever and a 0 delay.

Since
v3.0
var schedule ( var  callback,
var  target,
var  interval,
var  paused,
var  key 
)

Calls scheduleCallback with kRepeatForever and a 0 delay.

Since
v3.0
local schedule ( local  callback,
local  target,
local  interval,
local  paused,
local  key 
)

Calls scheduleCallback with kRepeatForever and a 0 delay.

Since
v3.0
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 kRepeatForever to let the action run continuously delay is the amount of time the action will wait before it'll start

Since
v3.0, repeat and delay added in v1.1
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 kRepeatForever to let the action run continuously delay is the amount of time the action will wait before it'll start

Since
v3.0, repeat and delay added in v1.1
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 kRepeatForever to let the action run continuously delay is the amount of time the action will wait before it'll start

Since
v3.0, repeat and delay added in v1.1
void schedule ( SEL_SCHEDULE  selector,
Ref target,
float  interval,
bool  paused 
)

calls scheduleSelector with kRepeatForever and a 0 delay

var schedule ( var  selector,
var  target,
var  interval,
var  paused 
)

calls scheduleSelector with kRepeatForever and a 0 delay

local schedule ( local  selector,
local  target,
local  interval,
local  paused 
)

calls scheduleSelector with kRepeatForever and a 0 delay

void schedulePerFrame ( const ccSchedulerFunc callback,
void *  target,
int  priority,
bool  paused 
)
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.

Note
This method is only for internal use.
Since
v3.0
var schedulePerFrame ( var  callback,
var  target,
var  priority,
var  paused 
)
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.

Note
This method is only for internal use.
Since
v3.0
local schedulePerFrame ( local  callback,
local  target,
local  priority,
local  paused 
)
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.

Note
This method is only for internal use.
Since
v3.0
void scheduleSelector ( SEL_SCHEDULE  selector,
Ref target,
float  interval,
unsigned int  repeat,
float  delay,
bool  paused 
)
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 kRepeatForever to let the action run continuously delay is the amount of time the action will wait before it'll start

Deprecated:
Please use 'Scheduler::schedule' instead.
Since
v0.99.3, repeat and delay added in v1.1
var scheduleSelector ( var  selector,
var  target,
var  interval,
var  repeat,
var  delay,
var  paused 
)
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 kRepeatForever to let the action run continuously delay is the amount of time the action will wait before it'll start

Deprecated:
Please use 'Scheduler::schedule' instead.
Since
v0.99.3, repeat and delay added in v1.1
local scheduleSelector ( local  selector,
local  target,
local  interval,
local  repeat,
local  delay,
local  paused 
)
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 kRepeatForever to let the action run continuously delay is the amount of time the action will wait before it'll start

Deprecated:
Please use 'Scheduler::schedule' instead.
Since
v0.99.3, repeat and delay added in v1.1
void scheduleSelector ( SEL_SCHEDULE  selector,
Ref target,
float  interval,
bool  paused 
)
inline

calls scheduleSelector with kRepeatForever and a 0 delay

Deprecated:
Please use 'Scheduler::schedule' instead.
var scheduleSelector ( var  selector,
var  target,
var  interval,
var  paused 
)
inline

calls scheduleSelector with kRepeatForever and a 0 delay

Deprecated:
Please use 'Scheduler::schedule' instead.
local scheduleSelector ( local  selector,
local  target,
local  interval,
local  paused 
)
inline

calls scheduleSelector with kRepeatForever and a 0 delay

Deprecated:
Please use 'Scheduler::schedule' instead.
void scheduleUpdate ( T *  target,
int  priority,
bool  paused 
)
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.

Since
v3.0
var scheduleUpdate ( var  target,
var  priority,
var  paused 
)
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.

Since
v3.0
void scheduleUpdateForTarget ( T *  target,
int  priority,
bool  paused 
)
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.

Deprecated:
Please use 'Scheduler::scheduleUpdate' instead.
Since
v0.99.3
var scheduleUpdateForTarget ( var  target,
var  priority,
var  paused 
)
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.

Deprecated:
Please use 'Scheduler::scheduleUpdate' instead.
Since
v0.99.3
local scheduleUpdateForTarget ( local  target,
local  priority,
local  paused 
)
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.

Deprecated:
Please use 'Scheduler::scheduleUpdate' instead.
Since
v0.99.3
void setTimeScale ( float  timeScale)
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.

Since
v0.8
Warning
It will affect EVERY scheduled selector / action.
var setTimeScale ( var  timeScale)
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.

Since
v0.8
Warning
It will affect EVERY scheduled selector / action.
local setTimeScale ( local  timeScale)
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.

Since
v0.8
Warning
It will affect EVERY scheduled selector / action.
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.

Since
v3.0
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.

Since
v3.0
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.

Since
v3.0
void unschedule ( SEL_SCHEDULE  selector,
Ref target 
)

Unschedule a selector for a given target.

If you want to unschedule the "update", use unscheudleUpdate.

Since
v3.0
var unschedule ( var  selector,
var  target 
)

Unschedule a selector for a given target.

If you want to unschedule the "update", use unscheudleUpdate.

Since
v3.0
local unschedule ( local  selector,
local  target 
)

Unschedule a selector for a given target.

If you want to unschedule the "update", use unscheudleUpdate.

Since
v3.0
void unscheduleAll ( void  )

Unschedules all selectors from all targets.

You should NEVER call this method, unless you know what you are doing.

Since
v0.99.3
var unscheduleAll (   )

Unschedules all selectors from all targets.

You should NEVER call this method, unless you know what you are doing.

Since
v0.99.3
local unscheduleAll (   )

Unschedules all selectors from all targets.

You should NEVER call this method, unless you know what you are doing.

Since
v0.99.3
void unscheduleAllForTarget ( void *  target)

Unschedules all selectors for a given target.

This also includes the "update" selector.

Since
v0.99.3
var unscheduleCallbackForTarget ( var  target)

Unschedules all selectors for a given target.

This also includes the "update" selector.

Since
v0.99.3
void unscheduleAllWithMinPriority ( int  minPriority)

Unschedules all selectors from all targets with a minimum priority.

You should only call this with kPriorityNonSystemMin or higher.

Since
v2.0.0
var unscheduleAllWithMinPriority ( var  minPriority)

Unschedules all selectors from all targets with a minimum priority.

You should only call this with kPriorityNonSystemMin or higher.

Since
v2.0.0
local unscheduleAllWithMinPriority ( local  minPriority)

Unschedules all selectors from all targets with a minimum priority.

You should only call this with kPriorityNonSystemMin or higher.

Since
v2.0.0
void unscheduleSelector ( SEL_SCHEDULE  selector,
Ref target 
)
inline

Unschedule a selector for a given target.

If you want to unschedule the "update", use unscheudleUpdateForTarget.

Deprecated:
Please use 'Scheduler::unschedule' instead.
Since
v0.99.3
var unscheduleSelector ( var  selector,
var  target 
)
inline

Unschedule a selector for a given target.

If you want to unschedule the "update", use unscheudleUpdateForTarget.

Deprecated:
Please use 'Scheduler::unschedule' instead.
Since
v0.99.3
local unscheduleSelector ( local  selector,
local  target 
)
inline

Unschedule a selector for a given target.

If you want to unschedule the "update", use unscheudleUpdateForTarget.

Deprecated:
Please use 'Scheduler::unschedule' instead.
Since
v0.99.3
void unscheduleUpdate ( void *  target)

Unschedules the update selector for a given target.

Since
v0.99.3
var unscheduleUpdate ( var  target)

Unschedules the update selector for a given target.

Since
v0.99.3
local unscheduleUpdate ( local  target)

Unschedules the update selector for a given target.

Since
v0.99.3
void unscheduleUpdateForTarget ( Ref target)
inline

Unschedules the update selector for a given target.

Deprecated:
Please use 'Scheduler::unscheduleUpdate' instead.
Since
v0.99.3
var unscheduleUpdateForTarget ( var  target)
inline

Unschedules the update selector for a given target.

Deprecated:
Please use 'Scheduler::unscheduleUpdate' instead.
Since
v0.99.3
local unscheduleUpdateForTarget ( local  target)
inline

Unschedules the update selector for a given target.

Deprecated:
Please use 'Scheduler::unscheduleUpdate' instead.
Since
v0.99.3
void update ( float  dt)

'update' the scheduler.

You should NEVER call this method, unless you know what you are doing.

Member Data Documentation

struct _hashSelectorEntry*
_currentTarget
protected
var _currentTarget
protected
local _currentTarget
protected
bool _currentTargetSalvaged
protected
var _currentTargetSalvaged
protected
local _currentTargetSalvaged
protected
std::vector<std::function<void()>
> _functionsToPerform
protected
var _functionsToPerform
protected
local _functionsToPerform
protected
struct _hashSelectorEntry*
_hashForTimers
protected
var _hashForTimers
protected
local _hashForTimers
protected
struct _hashUpdateEntry*
_hashForUpdates
protected
var _hashForUpdates
protected
local _hashForUpdates
protected
std::mutex _performMutex
protected
var _performMutex
protected
local _performMutex
protected
float _timeScale
protected
bool _updateHashLocked
protected
var _updateHashLocked
protected
local _updateHashLocked
protected
struct _listEntry* _updates0List
protected
var _updates0List
protected
local _updates0List
protected
struct _listEntry* _updatesNegList
protected
var _updatesNegList
protected
local _updatesNegList
protected
struct _listEntry* _updatesPosList
protected
var _updatesPosList
protected
local _updatesPosList
protected
const int PRIORITY_NON_SYSTEM_MIN
static
var PRIORITY_NON_SYSTEM_MIN
static
local PRIORITY_NON_SYSTEM_MIN
static
const int PRIORITY_SYSTEM
static
var PRIORITY_SYSTEM
static
local PRIORITY_SYSTEM
static

The documentation for this class was generated from the following file: