Base class for CCAction objects.
Class CCAction
#include <Geode/cocos/actions/CCAction.h>
Examples0
Public static methods1
staticcocos2d::CCAction*create()
Create an action
Public member functions15
charconst*description()
virtualcocos2d::CCObject*copyWithZone(cocos2d::CCZone*pZone)
virtualboolisDone()
//! return true if the action has finished
virtualvoidstartWithTarget(cocos2d::CCNode*pTarget)
//! 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(floatdt)
//! 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()
voidsetTarget(cocos2d::CCNode*pTarget)
The action will modify the target properties.
cocos2d::CCNode*getOriginalTarget()
voidsetOriginalTarget(cocos2d::CCNode*pOriginalTarget)
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()
floatgetSpeedMod()
Fields0
Protected member functions0
Protected fields4
cocos2d::CCNode*m_pOriginalTarget;
cocos2d::CCNode*m_pTarget;
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