cocos2d-x
2.2.3-gd2.113-rev1ec524e
|
CCActionManager is a singleton that manages all the actions. More...
#include <CCActionManager.h>
Public Member Functions | |
CCActionManager (void) | |
ctor More... | |
~CCActionManager (void) | |
NA NA. More... | |
void | addAction (CCAction *pAction, CCNode *pTarget, bool paused) |
Adds an action with a target. More... | |
void | removeAllActions (void) |
Removes all actions from all the targets. More... | |
void | removeAllActionsFromTarget (CCObject *pTarget) |
Removes all actions from a certain target. More... | |
void | removeAction (CCAction *pAction) |
Removes an action given an action reference. More... | |
void | removeActionByTag (unsigned int tag, CCObject *pTarget) |
Removes an action given its tag and the target. More... | |
CCAction * | getActionByTag (unsigned int tag, CCObject *pTarget) |
Gets an action given its tag an a target. More... | |
unsigned int | numberOfRunningActionsInTarget (CCObject *pTarget) |
Returns the numbers of actions that are running in a certain target. More... | |
void | pauseTarget (CCObject *pTarget) |
Pauses the target: all running actions and newly added actions will be paused. More... | |
void | resumeTarget (CCObject *pTarget) |
Resumes the target. More... | |
CCSet * | pauseAllRunningActions () |
Pauses all running actions, returning a list of targets whose actions were paused. More... | |
void | resumeTargets (CCSet *targetsToResume) |
Resume a set of targets (convenience function to reverse a pauseAllRunningActions call) More... | |
![]() | |
CCObject (void) | |
virtual | ~CCObject (void) |
NA. More... | |
void | release (void) |
void | retain (void) |
CCObject * | autorelease (void) |
CCObject * | copy (void) |
bool | isSingleReference (void) const |
unsigned int | retainCount (void) const |
virtual bool | isEqual (const CCObject *pObject) |
virtual void | acceptVisitor (CCDataVisitor &visitor) |
virtual void | update (float dt) |
CCObject (const CCObject &) | |
CCObject & | operator= (const CCObject &) |
virtual void | encodeWithCoder (DS_Dictionary *) |
virtual bool | canEncode () |
CCObjectType | getObjType () const |
virtual int | getTag () const |
virtual void | setTag (int nTag) |
void | setObjType (CCObjectType) |
![]() | |
virtual CCObject * | copyWithZone (CCZone *pZone) |
Protected Member Functions | |
void | removeActionAtIndex (unsigned int uIndex, struct _hashElement *pElement) |
void | deleteHashElement (struct _hashElement *pElement) |
void | actionAllocWithHashElement (struct _hashElement *pElement) |
void | update (float dt) |
Protected Attributes | |
struct _hashElement * | m_pTargets |
struct _hashElement * | m_pCurrentTarget |
bool | m_bCurrentTargetSalvaged |
![]() | |
unsigned int | m_uReference |
unsigned int | m_uAutoReleaseCount |
int | m_nTag |
int | m_eObjType |
unsigned int | m_uObjectIdxInArray |
Additional Inherited Members | |
![]() | |
static CCObject * | createWithCoder (DS_Dictionary *) |
![]() | |
unsigned int | m_uID |
int | m_nLuaID |
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:
CCActionManager | ( | void | ) |
ctor
~CCActionManager | ( | void | ) |
NA NA.
|
protected |
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 not, and the action will be added to the newly created target. When the target is paused, the queued actions won't be 'ticked'.
|
protected |
Gets an action given its tag an a target.
unsigned int numberOfRunningActionsInTarget | ( | CCObject * | pTarget | ) |
Returns the numbers of actions that are running in a certain target.
Composable actions are counted as 1 action. Example:
CCSet * pauseAllRunningActions | ( | ) |
Pauses all running actions, returning a list of targets whose actions were paused.
void pauseTarget | ( | CCObject * | pTarget | ) |
Pauses the target: all running actions and newly added actions will be paused.
void removeAction | ( | CCAction * | pAction | ) |
Removes an action given an action reference.
|
protected |
void removeActionByTag | ( | unsigned int | tag, |
CCObject * | pTarget | ||
) |
Removes an action given its tag and the target.
void removeAllActions | ( | void | ) |
Removes all actions from all the targets.
void removeAllActionsFromTarget | ( | CCObject * | pTarget | ) |
Removes all actions from a certain target.
All the actions that belongs to the target will be removed.
void resumeTarget | ( | CCObject * | pTarget | ) |
Resumes the target.
All queued actions will be resumed.
void resumeTargets | ( | CCSet * | targetsToResume | ) |
Resume a set of targets (convenience function to reverse a pauseAllRunningActions call)
|
protectedvirtual |
Reimplemented from CCObject.
|
protected |
|
protected |
|
protected |