![]() |
cocos2d-iphone
2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
|
#import <CCActionManager.h>
Public Member Functions | |
(void) | - addAction:target:paused: |
(void) | - removeAllActions |
(void) | - removeAllActionsFromTarget: |
(void) | - removeAction: |
(void) | - removeActionByTag:target: |
(CCAction *) | - getActionByTag:target: |
(NSUInteger) | - numberOfRunningActionsInTarget: |
(void) | - pauseTarget: |
(void) | - resumeTarget: |
(NSSet *) | - pauseAllRunningActions |
(void) | - resumeTargets: |
Static Public Member Functions | |
(CCActionManager *) | + DEPRECATED_ATTRIBUTE |
Protected Attributes | |
tHashElement * | targets |
tHashElement * | currentTarget |
BOOL | currentTargetSalvaged |
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:
- (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: | (NSInteger) | tag | |
target: | (id) | target | |
Gets an action given its tag an a target
- (NSUInteger) 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.
- (NSSet *) pauseAllRunningActions |
Pauses all running actions, returning a list of targets whose actions were paused.
- (void) pauseTarget: | (id) | target |
Pauses the target: all running actions and newly added actions will be paused.
- (void) removeAction: | (CCAction *) | action |
Removes an action given an action reference.
- (void) removeActionByTag: | (NSInteger) | tag | |
target: | (id) | target | |
Removes an action given its tag and the target
- (void) removeAllActions |
Removes all actions from all the targets.
- (void) removeAllActionsFromTarget: | (id) | target |
Removes all actions from a certain target. All the actions that belongs to the target will be removed.
- (void) resumeTarget: | (id) | target |
Resumes the target. All queued actions will be resumed.
- (void) resumeTargets: | (NSSet *) | targetsToResume |
Resume a set of targets (convenience function to reverse a pauseAllRunningActions call)