Пример #1
0
        /// <summary>
        /// returns a shared instance of the CCActionManager
        /// </summary>
        public static CCActionManager sharedManager()
        {
            CCActionManager ret = g_sharedActionManager;

            if (ret == null)
            {
                ret = g_sharedActionManager = new CCActionManager();

                if (!g_sharedActionManager.init())
                {
                    ret = g_sharedActionManager = null;
                }
            }

            return(ret);
        }
Пример #2
0
 /// <summary>
 /// pauses all scheduled selectors and actions.
 /// Called internally by onExit
 /// </summary>
 public void pauseSchedulerAndActions()
 {
     CCScheduler.sharedScheduler().pauseTarget(this);
     CCActionManager.sharedManager().pauseTarget(this);
 }
Пример #3
0
 /// <summary>
 /// 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.
 /// </summary>
 public uint numberOfRunningActions()
 {
     return(CCActionManager.sharedManager().numberOfRunningActionsInTarget(this));
 }
Пример #4
0
 /// <summary>
 /// resumes all scheduled selectors and actions.
 /// Called internally by onEnter
 /// </summary>
 public void resumeSchedulerAndActions()
 {
     CCScheduler.sharedScheduler().resumeTarget(this);
     CCActionManager.sharedManager().resumeTarget(this);
 }
Пример #5
0
 /// <summary>
 /// Gets an action from the running action list given its tag
 /// @since v0.7.1
 /// @return
 /// </summary>
 /// <returns>the Action the with the given tag</returns>
 public CCAction getActionByTag(int tag)
 {
     Debug.Assert((int)tag != (int)NodeTag.kCCNodeTagInvalid, "Invalid tag");
     return(CCActionManager.sharedManager().getActionByTag((uint)tag, this));
 }
Пример #6
0
 /// <summary>
 /// Removes an action from the running action list given its tag
 /// @since v0.7.1
 /// </summary>
 public void stopActionByTag(int tag)
 {
     Debug.Assert(tag != (int)NodeTag.kCCNodeTagInvalid, "Invalid tag");
     CCActionManager.sharedManager().removeActionByTag(tag, this);
 }
Пример #7
0
 /// <summary>
 /// Removes an action from the running action list
 /// </summary>
 public void stopAction(CCAction action)
 {
     CCActionManager.sharedManager().removeAction(action);
 }
Пример #8
0
 /// <summary>
 /// Removes all actions from the running action list
 /// </summary>
 public void stopAllActions()
 {
     CCActionManager.sharedManager().removeAllActionsFromTarget(this);
 }
Пример #9
0
 /// <summary>
 /// 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
 /// </summary>
 /// <returns>An Action pointer</returns>
 public CCAction runAction(CCAction action)
 {
     Debug.Assert(action != null, "Argument must be non-nil");
     CCActionManager.sharedManager().addAction(action, this, !m_bIsRunning);
     return(action);
 }