/** resumes all scheduled selectors and actions. Called internally by onEnter */ public void resumeSchedulerAndActions() { CCScheduler.sharedScheduler().resume(this); CCActionManager.sharedManager().resume(this); }
/** pauses all scheduled selectors and actions. Called internally by onExit */ public void pauseSchedulerAndActions() { CCScheduler.sharedScheduler().pause(this); CCActionManager.sharedManager().pause(this); }
/* * unschedules a custom callback. * * This is java way version, uses interface based callbacks. UpdateCallback in this case. * It would be preffered solution. It is more polite to Java, GC, and obfuscation. */ public void unschedule(UpdateCallback callback) { // explicit null handling if (callback == null) return; CCScheduler.sharedScheduler().unschedule(callback, this); }
/** * unschedule all scheduled selectors: custom selectors, and the 'update' selector. Actions are * not affected by this method. * * @since v0.99.3 */ public void unscheduleAllSelectors() { CCScheduler.sharedScheduler().unscheduleAllSelectors(this); }
/* unschedules a custom selector.*/ public void unschedule(String selector) { // explicit null handling if (selector == null) return; CCScheduler.sharedScheduler().unschedule(selector, this); }
/* * schedules a custom callback with an interval time in seconds. * If time is 0 it will be ticked every frame. * If time is 0, it is recommended to use 'scheduleUpdate' instead. * * This is java way version, uses interface based callbacks. UpdateCallback in this case. * It would be preffered solution. It is more polite to Java, GC, and obfuscation. */ public void schedule(UpdateCallback callback, float interval) { assert callback != null : "Argument callback must be non-null"; assert interval >= 0 : "Argument interval must be positive"; CCScheduler.sharedScheduler().schedule(callback, this, interval, !isRunning_); }
/** * schedules a custom selector with an interval time in seconds. If time is 0 it will be ticked * every frame. If time is 0, it is recommended to use 'scheduleUpdate' instead. */ public void schedule(String selector, float interval) { assert selector != null : "Argument selector must be non-null"; assert interval >= 0 : "Argument interval must be positive"; CCScheduler.sharedScheduler().schedule(selector, this, interval, !isRunning_); }
/** * unschedules the "update" method. * * @since v0.99.3 */ public void unscheduleUpdate() { CCScheduler.sharedScheduler().unscheduleUpdate(this); }
/** * schedules the "update" selector with a custom priority. This selector will be called every * frame. Scheduled selectors with a lower priority will be called before the ones that have a * higher value. Only one "update" selector could be scheduled per node (You can't have 2 'update' * selectors). * * @since v0.99.3 */ public void scheduleUpdate(int priority) { CCScheduler.sharedScheduler().scheduleUpdate(this, priority, !isRunning_); }