Class CCActionManager

#include <Geode/cocos/actions/CCActionManager.h>
classCCActionManager:publiccocos2d::CCObject{ ... }

Since v0.8

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:

  • When you want to run an action where the target is different from a CCNode.
  • When you want to pause / resume the actions
Examples0
Public static methods0
Public member functions11
voidaddAction(,,
boolpaused
)

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’.

voidremoveAllActions()

Removes all actions from all the targets.

voidremoveAllActionsFromTarget()

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

voidremoveAction()

Removes an action given an action reference.

voidremoveActionByTag(
uinttag
,)

Removes an action given its tag and the target

cocos2d::CCAction*getActionByTag(
uinttag
,)

Gets an action given its tag an a target

Return value
the Action the with the given tag
uintnumberOfRunningActionsInTarget()

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.
voidpauseTarget()

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

voidresumeTarget()

Resumes the target. All queued actions will be resumed.

cocos2d::CCSet*pauseAllRunningActions()

Pauses all running actions, returning a list of targets whose actions were paused.

voidresumeTargets(
cocos2d::CCSet*targetsToResume
)

Resume a set of targets (convenience function to reverse a pauseAllRunningActions call)

Fields0
Protected member functions4
voidremoveActionAtIndex(
uintuIndex
,)
No description provided
voiddeleteHashElement()
No description provided
voidactionAllocWithHashElement()
No description provided
virtualvoidupdate()
No description provided
Protected fields3
;
No description provided
cocos2d::_hashElement*m_pCurrentTarget
;
No description provided
boolm_bCurrentTargetSalvaged
;
No description provided