Public Member Functions | Static Public Member Functions

CCActionManager Class Reference

#import <CCActionManager.h>

List of all members.

Public Member Functions

(void) - addAction:target:paused:
(void) - removeAllActions
(void) - removeAllActionsFromTarget:
(void) - removeAction:
(void) - removeActionByTag:target:
(CCAction *) - getActionByTag:target:
(int) - numberOfRunningActionsInTarget:
(void) - pauseTarget:
(void) - resumeTarget:
(void) - resumeAllActionsForTarget:
(void) - pauseAllActionsForTarget:

Static Public Member Functions

(CCActionManager *) + sharedManager
(void) + purgeSharedManager

Detailed Description

CCActionManager is a singleton that manages all the actions. Normally you won't need to use this singleton directly. 99% of the cases you will use the CCNode interface, which uses this singleton. But there are some cases where you might need to use this singleton. Examples:

Since:
v0.8

Definition at line 54 of file CCActionManager.h.


Member Function Documentation

- (void) addAction: (CCAction *)  action
target: (id)  target
paused: (BOOL)  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'.

- (CCAction*) getActionByTag: (int)  tag
target: (id)  target 

Gets an action given its tag an a target

Returns:
the Action the with the given tag
- (int) numberOfRunningActionsInTarget: (id)  target  

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.

- (void) pauseAllActionsForTarget: (id)  DEPRECATED_ATTRIBUTE  

Pauses the target: all running actions and newly added actions will be paused.

- (void) pauseTarget: (id)  target  

Pauses the target: all running actions and newly added actions will be paused.

+ (void) purgeSharedManager  

purges the shared action manager. It releases the retained instance.

Since:
v0.99.0
- (void) removeAction: (CCAction *)  action  

Removes an action given an action reference.

- (void) removeActionByTag: (int)  tag
target: (id)  target 

Removes an action given its tag and the target

- (void) removeAllActions  

Removes all actions from all the targers.

- (void) removeAllActionsFromTarget: (id)  target  

Removes all actions from a certain target. All the actions that belongs to the target will be removed.

- (void) resumeAllActionsForTarget: (id)  DEPRECATED_ATTRIBUTE  

Resumes the target. All queued actions will be resumed.

Deprecated:
Use resumeTarget: instead. Will be removed in v1.0.
- (void) resumeTarget: (id)  target  

Resumes the target. All queued actions will be resumed.

+ (CCActionManager *) sharedManager  

returns a shared instance of the CCActionManager


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

cocos2d for iPhone 0.99.4 API Reference - Generated using Doxygen 1.7.1