cocos2d-x
2.2.3-gd2.113-rev1ec524e
|
Base class for CCAction objects. More...
#include <CCAction.h>
Public Member Functions | |
CCAction (void) | |
ctor More... | |
virtual | ~CCAction (void) |
NA NA. More... | |
const char * | description () |
NA NA. More... | |
virtual CCObject * | copyWithZone (CCZone *pZone) |
NA NA. More... | |
virtual bool | isDone (void) |
return true if the action has finished More... | |
virtual void | startWithTarget (CCNode *pTarget) |
called before the action start. It will also set the target. More... | |
virtual void | stop (void) |
called after the action has finished. More... | |
virtual void | step (float dt) |
called every frame with it's delta time. DON'T override unless you know what you are doing. More... | |
virtual void | update (float time) |
called once per frame. More... | |
CCNode * | getTarget (void) |
void | setTarget (CCNode *pTarget) |
The action will modify the target properties. More... | |
CCNode * | getOriginalTarget (void) |
void | setOriginalTarget (CCNode *pOriginalTarget) |
Set the original target, since target can be nil. More... | |
int | getTag (void) |
void | setTag (int nTag) |
void | setSpeedMod (float mod) |
![]() | |
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 |
void | setObjType (CCObjectType) |
virtual CCObject * | copyWithZone (CCZone *pZone) |
Static Public Member Functions | |
static CCAction * | create () |
Create an action. More... | |
![]() | |
static CCObject * | createWithCoder (DS_Dictionary *) |
Protected Attributes | |
CCNode * | m_pOriginalTarget |
CCNode * | m_pTarget |
The "target". More... | |
int | m_nTag |
The action tag. More... | |
float | m_fSpeedMod |
![]() | |
unsigned int | m_uReference |
unsigned int | m_uAutoReleaseCount |
int | m_nTag |
int | m_eObjType |
unsigned int | m_uObjectIdxInArray |
Additional Inherited Members | |
![]() | |
unsigned int | m_uID |
int | m_nLuaID |
Base class for CCAction objects.
CCAction | ( | void | ) |
ctor
|
virtual |
NA NA.
NA NA.
Reimplemented from CCCopying.
Reimplemented in CCSpeed, CCFollow, CCOrbitCamera, CCCardinalSplineTo, CCActionEase, CCEaseRateAction, CCEaseIn, CCEaseOut, CCEaseInOut, CCEaseExponentialIn, CCEaseExponentialOut, CCEaseExponentialInOut, CCEaseSineIn, CCEaseSineOut, CCEaseSineInOut, CCEaseElastic, CCEaseElasticIn, CCEaseElasticOut, CCEaseElasticInOut, CCEaseBounce, CCEaseBounceIn, CCEaseBounceOut, CCEaseBounceInOut, CCEaseBackIn, CCEaseBackOut, CCEaseBackInOut, CCGridAction, CCWaves3D, CCFlipX3D, CCFlipY3D, CCLens3D, CCRipple3D, CCShaky3D, CCLiquid, CCWaves, CCTwirl, CCActionInstant, CCShow, CCHide, CCToggleVisibility, CCRemoveSelf, CCFlipX, CCFlipY, CCPlace, CCCallFunc, CCCallFuncN, CCCallFuncND, CCCallFuncO, CCActionInterval, CCSequence, CCRepeat, CCRepeatForever, CCSpawn, CCRotateTo, CCRotateBy, CCMoveBy, CCMoveTo, CCSkewTo, CCJumpBy, CCJumpTo, CCBezierBy, CCBezierTo, CCScaleTo, CCScaleBy, CCBlink, CCFadeIn, CCFadeOut, CCFadeTo, CCTintTo, CCTintBy, CCDelayTime, CCReverseTime, CCAnimate, CCTargetedAction, CCProgressTo, CCProgressFromTo, CCShakyTiles3D, CCShatteredTiles3D, CCShuffleTiles, CCTurnOffTiles, CCWavesTiles3D, CCJumpTiles3D, CCSplitRows, and CCSplitCols.
|
static |
Create an action.
const char * description | ( | ) |
NA NA.
|
inline |
|
inlinevirtual |
|
inline |
|
virtual |
return true if the action has finished
Reimplemented in CCSpeed, CCFollow, CCActionInstant, CCActionInterval, CCRepeat, and CCRepeatForever.
|
inline |
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'.
void setSpeedMod | ( | float | mod | ) |
|
inlinevirtual |
|
inline |
The action will modify the target properties.
|
virtual |
called before the action start. It will also set the target.
Reimplemented in CCSpeed, CCActionCamera, CCOrbitCamera, CCCardinalSplineTo, CCCardinalSplineBy, CCActionEase, CCGridAction, CCAccelDeccelAmplitude, CCAccelAmplitude, CCDeccelAmplitude, CCStopGrid, CCReuseGrid, CCActionInterval, CCSequence, CCRepeat, CCRepeatForever, CCSpawn, CCRotateTo, CCRotateBy, CCMoveBy, CCMoveTo, CCSkewTo, CCSkewBy, CCJumpBy, CCJumpTo, CCBezierBy, CCBezierTo, CCScaleTo, CCScaleBy, CCBlink, CCFadeTo, CCTintTo, CCTintBy, CCReverseTime, CCAnimate, CCTargetedAction, CCProgressTo, CCProgressFromTo, CCShuffleTiles, CCTurnOffTiles, CCSplitRows, CCSplitCols, and CCActionTween.
|
virtual |
called every frame with it's delta time. DON'T override unless you know what you are doing.
Reimplemented in CCSpeed, CCFollow, CCActionInstant, CCActionInterval, and CCRepeatForever.
|
virtual |
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);"
Reimplemented in CCSpeed, CCBlink, CCFollow, CCActionEase, CCSequence, CCRepeat, CCSpawn, CCReverseTime, CCAnimate, and CCTargetedAction.
|
virtual |
called once per frame.
time a value between 0 and 1
For example:
Reimplemented from CCObject.
Reimplemented in CCRepeat, CCActionTween, CCSequence, CCAnimate, CCOrbitCamera, CCCardinalSplineTo, CCActionEase, CCEaseIn, CCEaseOut, CCEaseInOut, CCEaseExponentialIn, CCEaseExponentialOut, CCEaseExponentialInOut, CCEaseSineIn, CCEaseSineOut, CCEaseSineInOut, CCEaseElasticIn, CCEaseElasticOut, CCEaseElasticInOut, CCEaseBounceIn, CCEaseBounceOut, CCEaseBounceInOut, CCEaseBackIn, CCEaseBackOut, CCEaseBackInOut, CCAccelDeccelAmplitude, CCAccelAmplitude, CCDeccelAmplitude, CCWaves3D, CCFlipX3D, CCFlipY3D, CCLens3D, CCRipple3D, CCShaky3D, CCLiquid, CCWaves, CCTwirl, CCActionInstant, CCShow, CCHide, CCToggleVisibility, CCRemoveSelf, CCFlipX, CCFlipY, CCPlace, CCCallFunc, CCSpawn, CCRotateTo, CCRotateBy, CCMoveBy, CCSkewTo, CCJumpBy, CCBezierBy, CCScaleTo, CCBlink, CCFadeIn, CCFadeOut, CCFadeTo, CCTintTo, CCTintBy, CCDelayTime, CCReverseTime, CCTargetedAction, CCPageTurn3D, CCProgressTo, CCProgressFromTo, CCShakyTiles3D, CCShatteredTiles3D, CCShuffleTiles, CCFadeOutTRTiles, CCTurnOffTiles, CCWavesTiles3D, CCJumpTiles3D, CCSplitRows, and CCSplitCols.
|
protected |
|
protected |
The action tag.
An identifier of the action
|
protected |
|
protected |
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'.