Ejemplo n.º 1
0
 /** pauses all scheduled selectors and actions. Called internally by onExit */
 public void pauseSchedulerAndActions() {
   CCScheduler.sharedScheduler().pause(this);
   CCActionManager.sharedManager().pause(this);
 }
Ejemplo n.º 2
0
 /**
  * Returns the numbers of actions that are running plus the ones that are schedule to run (actions
  * in actionsToAdd and actions arrays). Composable actions are counted as 1 action. Example: If
  * you are running 1 Sequence of 7 actions, it will return 1. If you are running 7 Sequences of 2
  * actions, it will return 7.
  */
 public int numberOfRunningActions() {
   return CCActionManager.sharedManager().numberOfRunningActions(this);
 }
Ejemplo n.º 3
0
 /** resumes all scheduled selectors and actions. Called internally by onEnter */
 public void resumeSchedulerAndActions() {
   CCScheduler.sharedScheduler().resume(this);
   CCActionManager.sharedManager().resume(this);
 }
Ejemplo n.º 4
0
  /**
   * Gets an action from the running action list given its tag
   *
   * @since v0.7.1
   * @return the Action the with the given tag
   */
  public CCAction getAction(int tag) {
    assert tag != CCAction.kCCActionTagInvalid : "Invalid tag_";

    return CCActionManager.sharedManager().getAction(tag, this);
  }
Ejemplo n.º 5
0
 /**
  * Removes an action from the running action list given its tag
  *
  * @since v0.7.1
  */
 public void stopAction(int tag) {
   assert tag != CCAction.kCCActionTagInvalid : "Invalid tag_";
   CCActionManager.sharedManager().removeAction(tag, this);
 }
Ejemplo n.º 6
0
 /** Removes an action from the running action list */
 public void stopAction(CCAction action) {
   CCActionManager.sharedManager().removeAction(action);
 }
Ejemplo n.º 7
0
 /** Removes all actions from the running action list */
 public void stopAllActions() {
   CCActionManager.sharedManager().removeAllActions(this);
 }
Ejemplo n.º 8
0
  /**
   * Executes an action, and returns the action that is executed. The node becomes the action's
   * target.
   *
   * @warning Starting from v0.8 actions don't retain their target anymore.
   * @since v0.7.1
   * @return An Action pointer
   */
  public CCAction runAction(CCAction action) {
    assert action != null : "Argument must be non-null";

    CCActionManager.sharedManager().addAction(action, this, !isRunning_);
    return action;
  }