CCActionManager Class Reference
Inherits from | NSObject |
Declared in | CCActionManager.h |
Overview
CCActionManager the object that manages all the actions. Normally you won’t need to use this API directly. 99% of the cases you will use the CCNode interface, which uses this object. But there are some cases where you might need to use this API directly: Examples:
- When you want to run an action where the target is different from a CCNode.
- When you want to pause / resume the actions
Tasks
Other Methods
-
– addAction:target:paused:
Adds an action with a target. If the target is already present, then the action will be added to the existing target. If the target is not present, a new instance of this target will be created either paused or paused, and the action will be added to the newly created target. When the target is paused, the queued actions won’t be ‘ticked’.
-
– removeAllActions
Removes all actions from all the targets.
-
– removeAllActionsFromTarget:
Removes all actions from a certain target. All the actions that belongs to the target will be removed.
-
– removeAction:
Removes an action given an action reference.
-
– removeActionByTag:target:
Removes an action given its tag and the target
-
– getActionByTag:target:
Gets an action given its tag an a target
-
– numberOfRunningActionsInTarget:
Returns the numbers of actions that are running in a certain target 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.
-
– pauseTarget:
Pauses the target: all running actions and newly added actions will be paused.
-
– resumeTarget:
Resumes the target. All queued actions will be resumed.
-
– pauseAllRunningActions
Pauses all running actions, returning a list of targets whose actions were paused.
-
– resumeTargets:
Resume a set of targets (convenience function to reverse a pauseAllRunningActions call)
Other Methods
-
+ sharedManager
returns a shared instance of the CCActionManager
-
+ purgeSharedManager
purges the shared action manager. It releases the retained instance.
-
– resumeAllActionsForTarget:
Resumes the target. All queued actions will be resumed. (Deprecated: Use resumeTarget: instead. Will be removed in v1.0.)
-
– pauseAllActionsForTarget:
Pauses the target: all running actions and newly added actions will be paused.
Class Methods
Instance Methods
addAction:target:paused:
Adds an action with a target. If the target is already present, then the action will be added to the existing target. If the target is not present, a new instance of this target will be created either paused or paused, and the action will be added to the newly created target. When the target is paused, the queued actions won’t be ‘ticked’.
- (void)addAction:(CCAction *)action target:(id)target paused:(BOOL)paused
Declared In
CCActionManager.h
getActionByTag:target:
Gets an action given its tag an a target
- (CCAction *)getActionByTag:(NSInteger)tag target:(id)target
Return Value
the Action the with the given tag
Declared In
CCActionManager.h
numberOfRunningActionsInTarget:
Returns the numbers of actions that are running in a certain target 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.
- (NSUInteger)numberOfRunningActionsInTarget:(id)target
Declared In
CCActionManager.h
pauseAllActionsForTarget:
Pauses the target: all running actions and newly added actions will be paused.
- (void)pauseAllActionsForTarget:(id)target
Declared In
CCActionManager.h
pauseAllRunningActions
Pauses all running actions, returning a list of targets whose actions were paused.
- (NSSet *)pauseAllRunningActions
Declared In
CCActionManager.h
pauseTarget:
Pauses the target: all running actions and newly added actions will be paused.
- (void)pauseTarget:(id)target
Declared In
CCActionManager.h
removeAction:
Removes an action given an action reference.
- (void)removeAction:(CCAction *)action
Declared In
CCActionManager.h
removeActionByTag:target:
Removes an action given its tag and the target
- (void)removeActionByTag:(NSInteger)tag target:(id)target
Declared In
CCActionManager.h
removeAllActions
Removes all actions from all the targets.
- (void)removeAllActions
Declared In
CCActionManager.h
removeAllActionsFromTarget:
Removes all actions from a certain target. All the actions that belongs to the target will be removed.
- (void)removeAllActionsFromTarget:(id)target
Declared In
CCActionManager.h
resumeAllActionsForTarget:
Resumes the target. All queued actions will be resumed. (Deprecated: Use resumeTarget: instead. Will be removed in v1.0.)
- (void)resumeAllActionsForTarget:(id)target
Declared In
CCActionManager.h