Class CCAction

#include <Geode/cocos/actions/CCAction.h>
classCCAction:publiccocos2d::CCObject{ ... }

Base class for CCAction objects.

Examples0
Public static methods1
staticcocos2d::CCAction*create()

Create an action

Public member functions15
charconst*description()
No description provided
virtualcocos2d::CCObject*copyWithZone()
No description provided
virtualboolisDone()

//! return true if the action has finished

virtualvoidstartWithTarget()

//! called before the action start. It will also set the target.

virtualvoidstop()

called after the action has finished. It will set the ‘target’ to nil. IMPORTANT: You should never call “[action stop]” manually. Instead, use: “target->stopAction(action);”

virtualvoidstep()

//! called every frame with it’s delta time. DON’T override unless you know what you are doing.

virtualvoidupdate(
floattime
)

called once per frame. time a value between 0 and 1 For example:

  • 0 means that the action just started
  • 0.5 means that the action is in the middle
  • 1 means that the action is over
cocos2d::CCNode*getTarget()
No description provided
voidsetTarget()

The action will modify the target properties.

cocos2d::CCNode*getOriginalTarget()
No description provided
voidsetOriginalTarget(
cocos2d::CCNode*pOriginalTarget
)

Since v0.8.2

Set the original target, since target can be nil. Is the target that were used to run the action. Unless you are doing something complex, like CCActionManager, you should NOT call this method. The target is ‘assigned’, it is not ‘retained’.

intgetTag()
No description provided
virtualvoidsetTag(
intnTag
)
No description provided
voidsetSpeedMod()
No description provided
floatgetSpeedMod()
No description provided
Fields0
Protected member functions0
Protected fields4
cocos2d::CCNode*m_pOriginalTarget
;
No description provided
;

The “target”. The target will be set with the ‘startWithTarget’ method. When the ‘stop’ method is called, target will be set to nil. The target is ‘assigned’, it is not ‘retained’.

intm_nTag
;

The action tag. An identifier of the action

floatm_fSpeedMod
;
No description provided