|
cocos2d-x
2.1.1
|
Base class for CCAction objects. More...
#include <CCAction.h>
Public Member Functions | |
| CCAction (void) | |
| virtual | ~CCAction (void) |
| const char * | description () |
| virtual CCObject * | copyWithZone (CCZone *pZone) |
| virtual bool | isDone (void) |
| return true if the action has finished | |
| virtual void | startWithTarget (CCNode *pTarget) |
| called before the action start. It will also set the target. | |
| virtual void | stop (void) |
| called after the action has finished. | |
| virtual void | step (float dt) |
| called every frame with it's delta time. DON'T override unless you know what you are doing. | |
| virtual void | update (float time) |
| called once per frame. | |
| CCNode * | getTarget (void) |
| void | setTarget (CCNode *pTarget) |
| The action will modify the target properties. | |
| CCNode * | getOriginalTarget (void) |
| void | setOriginalTarget (CCNode *pOriginalTarget) |
| Set the original target, since target can be nil. | |
| int | getTag (void) |
| void | setTag (int nTag) |
Public Member Functions inherited from CCObject | |
| CCObject (void) | |
| virtual | ~CCObject (void) |
| void | release (void) |
| void | retain (void) |
| CCObject * | autorelease (void) |
| CCObject * | copy (void) |
| bool | isSingleReference (void) |
| unsigned int | retainCount (void) |
| virtual bool | isEqual (const CCObject *pObject) |
Static Public Member Functions | |
| static CCAction * | create () |
| Create an action. | |
Protected Attributes | |
| CCNode * | m_pOriginalTarget |
| CCNode * | m_pTarget |
| The "target". | |
| int | m_nTag |
| The action tag. | |
Protected Attributes inherited from CCObject | |
| unsigned int | m_uReference |
| unsigned int | m_uAutoReleaseCount |
Additional Inherited Members | |
Public Attributes inherited from CCObject | |
| unsigned int | m_uID |
| int | m_nLuaID |
Detailed Description
Base class for CCAction objects.
Constructor & Destructor Documentation
| CCAction | ( | void | ) |
|
virtual |
Member Function Documentation
Reimplemented from CCCopying.
Reimplemented in CCTargetedAction, CCAnimate, CCReverseTime, CCDelayTime, CCTintBy, CCTintTo, CCFadeTo, CCFadeOut, CCFadeIn, CCBlink, CCScaleBy, CCScaleTo, CCBezierTo, CCEaseBackInOut, CCBezierBy, CCEaseBackOut, CCJumpTo, CCEaseBackIn, CCJumpBy, CCEaseBounceInOut, CCEaseBounceOut, CCEaseBounceIn, CCSkewTo, CCEaseBounce, CCMoveTo, CCCallFuncO, CCEaseElasticInOut, CCMoveBy, CCEaseElasticOut, CCCallFuncND, CCRotateBy, CCEaseElasticIn, CCSplitCols, CCCallFuncN, CCRotateTo, CCEaseElastic, CCSplitRows, CCJumpTiles3D, CCEaseSineInOut, CCTwirl, CCSpawn, CCEaseSineOut, CCFollow, CCCallFunc, CCWavesTiles3D, CCEaseSineIn, CCWaves, CCEaseExponentialInOut, CCRepeatForever, CCLiquid, CCTurnOffTiles, CCPlace, CCEaseExponentialOut, CCSpeed, CCShaky3D, CCFlipY, CCEaseExponentialIn, CCBRotateTo, CCEaseInOut, CCRipple3D, CCRepeat, CCFlipX, CCBSetSpriteFrame, CCEaseOut, CCCardinalSplineTo, CCEaseIn, CCOrbitCamera, CCLens3D, CCToggleVisibility, CCSequence, CCShuffleTiles, CCHide, CCEaseRateAction, CCFlipY3D, CCActionInterval, CCFlipX3D, CCShow, CCProgressFromTo, CCShatteredTiles3D, CCActionEase, CCWaves3D, CCActionInstant, CCProgressTo, CCGridAction, and CCShakyTiles3D.
|
static |
Create an action.
| const char* description | ( | ) |
|
inline |
|
inline |
|
inline |
|
virtual |
return true if the action has finished
Reimplemented in CCFollow, CCRepeatForever, CCSpeed, CCRepeat, CCActionInterval, and CCActionInstant.
|
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'.
- Since
- v0.8.2
|
inline |
|
inline |
The action will modify the target properties.
|
virtual |
called before the action start. It will also set the target.
Reimplemented in CCTargetedAction, CCAnimate, CCReverseTime, CCTintBy, CCTintTo, CCFadeTo, CCBlink, CCScaleBy, CCScaleTo, CCBezierTo, CCBezierBy, CCJumpTo, CCJumpBy, CCSkewBy, CCSkewTo, CCMoveTo, CCMoveBy, CCRotateBy, CCSplitCols, CCRotateTo, CCSplitRows, CCSpawn, CCReuseGrid, CCStopGrid, CCRepeatForever, CCTurnOffTiles, CCDeccelAmplitude, CCSpeed, CCCardinalSplineBy, CCAccelAmplitude, CCBRotateTo, CCRepeat, CCCardinalSplineTo, CCAccelDeccelAmplitude, CCOrbitCamera, CCSequence, CCShuffleTiles, CCActionInterval, CCProgressFromTo, CCActionTween, CCActionCamera, CCActionEase, CCProgressTo, and CCGridAction.
|
virtual |
called every frame with it's delta time. DON'T override unless you know what you are doing.
Reimplemented in CCFollow, CCRepeatForever, CCSpeed, CCActionInterval, and CCActionInstant.
|
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 CCTargetedAction, CCAnimate, CCReverseTime, CCBlink, CCSpawn, CCFollow, CCSpeed, CCRepeat, CCSequence, and CCActionEase.
|
virtual |
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
Reimplemented from CCObject.
Reimplemented in CCTargetedAction, CCAnimate, CCReverseTime, CCDelayTime, CCTintBy, CCTintTo, CCFadeTo, CCFadeOut, CCFadeIn, CCBlink, CCScaleTo, CCEaseBackInOut, CCBezierBy, CCEaseBackOut, CCEaseBackIn, CCJumpBy, CCEaseBounceInOut, CCEaseBounceOut, CCSkewTo, CCEaseBounceIn, CCEaseElasticInOut, CCMoveBy, CCEaseElasticOut, CCRotateBy, CCEaseElasticIn, CCSplitCols, CCRotateTo, CCSplitRows, CCJumpTiles3D, CCTwirl, CCEaseSineInOut, CCSpawn, CCEaseSineOut, CCCallFunc, CCWavesTiles3D, CCWaves, CCEaseSineIn, CCEaseExponentialInOut, CCLiquid, CCTurnOffTiles, CCPlace, CCEaseExponentialOut, CCDeccelAmplitude, CCShaky3D, CCFlipY, CCEaseExponentialIn, CCBEaseInstant, CCAccelAmplitude, CCRepeat, CCBRotateTo, CCRipple3D, CCEaseInOut, CCFlipX, CCBSetSpriteFrame, CCCardinalSplineTo, CCEaseOut, CCAccelDeccelAmplitude, CCFadeOutTRTiles, CCOrbitCamera, CCSequence, CCLens3D, CCEaseIn, CCToggleVisibility, CCShuffleTiles, CCHide, CCFlipY3D, CCFlipX3D, CCProgressFromTo, CCActionTween, CCShow, CCShatteredTiles3D, CCActionEase, CCActionInstant, CCWaves3D, CCPageTurn3D, CCProgressTo, and CCShakyTiles3D.
Member Data Documentation
|
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'.
The documentation for this class was generated from the following file:
- /Users/zhangkoumyou/SourceCode/cocos2d-x/cocos2dx/actions/CCAction.h

Public Member Functions inherited from 