示例#1
0
 /** resumes all scheduled selectors and actions. Called internally by onEnter */
 public void resumeSchedulerAndActions() {
   CCScheduler.sharedScheduler().resume(this);
   CCActionManager.sharedManager().resume(this);
 }
示例#2
0
 /** pauses all scheduled selectors and actions. Called internally by onExit */
 public void pauseSchedulerAndActions() {
   CCScheduler.sharedScheduler().pause(this);
   CCActionManager.sharedManager().pause(this);
 }
示例#3
0
  /*
   * 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);
  }
示例#4
0
 /**
  * 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);
 }
示例#5
0
  /* unschedules a custom selector.*/
  public void unschedule(String selector) {
    // explicit null handling
    if (selector == null) return;

    CCScheduler.sharedScheduler().unschedule(selector, this);
  }
示例#6
0
  /*
   * 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_);
  }
示例#7
0
  /**
   * 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_);
  }
示例#8
0
 /**
  * unschedules the "update" method.
  *
  * @since v0.99.3
  */
 public void unscheduleUpdate() {
   CCScheduler.sharedScheduler().unscheduleUpdate(this);
 }
示例#9
0
 /**
  * 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_);
 }