cocos2d-x  2.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CCAction Class Reference

Base class for CCAction objects. More...

#include <CCAction.h>

Inheritance diagram for CCAction:
CCObject CCCopying ActionTimeline CCFiniteTimeAction CCFollow CCSpeed CCActionInstant CCActionInterval CCCallFunc CCFlipX CCFlipY CCHide CCPlace CCRemoveSelf CCReuseGrid CCShow CCStopGrid CCToggleVisibility CCBSetSpriteFrame CCBSoundEffect CCAccelAmplitude CCAccelDeccelAmplitude CCActionCamera CCActionEase CCActionTween CCAnimate CCBezierBy CCBlink CCCardinalSplineTo CCDeccelAmplitude CCDelayTime CCFadeIn CCFadeOut CCFadeTo CCGridAction CCJumpBy CCMoveBy CCProgressFromTo CCProgressTo CCRepeat CCRepeatForever CCReverseTime CCRotateBy CCRotateTo CCScaleTo CCSequence CCSkewTo CCSpawn CCTargetedAction CCTintBy CCTintTo CCBRotateTo CCBRotateXTo CCBRotateYTo

Public Member Functions

 CCAction (void)
 ctor ()
 CCAction ()
virtual ~CCAction (void)
const char * description ()
virtual CCObjectcopyWithZone (CCZone *pZone)
virtual bool isDone (void)
 return true if the action has finished More...
 
var isDone ()
 return true if the action has finished More...
 
local isDone ()
 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...
 
local startWithTarget ( local 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...
 
local step ( local 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...
 
local update ( local time)
 called once per frame. More...
 
CCNodegetTarget (void)
var getTarget ()
local getTarget ()
void setTarget (CCNode *pTarget)
 The action will modify the target properties. More...
 
local setTarget ( local pTarget)
 The action will modify the target properties. More...
 
CCNodegetOriginalTarget (void)
local getOriginalTarget ()
void setOriginalTarget (CCNode *pOriginalTarget)
 Set the original target, since target can be nil. More...
 
int getTag (void)
var getTag ()
local getTag ()
void setTag (int nTag)
var setTag ( var nTag)
local setTag ( local nTag)
- Public Member Functions inherited from CCObject
 CCObject (void)
virtual ~CCObject (void)
void release (void)
void retain (void)
CCObjectautorelease (void)
CCObjectcopy (void)
bool isSingleReference (void) const
unsigned int retainCount (void) const
virtual bool isEqual (const CCObject *pObject)
virtual void acceptVisitor (CCDataVisitor &visitor)

Static Public Member Functions

static CCActioncreate ()
 Create an action. More...
 
var create ()
 Create an action. More...
 
local create ()
 Create an action. More...
 

Protected Attributes

CCNodem_pOriginalTarget
CCNodem_pTarget
 The "target". More...
 
local m_pTarget
 The "target". More...
 
int m_nTag
 The action tag. More...
 
- 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  )
var ctor (   )
local CCAction (   )
virtual ~CCAction ( void  )
virtual

Member Function Documentation

virtual CCObject* copyWithZone ( CCZone pZone)
virtual

Reimplemented from CCCopying.

Reimplemented in CCTargetedAction, CCAnimate, CCReverseTime, CCDelayTime, CCTintBy, CCTintTo, CCFadeTo, CCFadeOut, CCFadeIn, CCBlink, CCScaleBy, CCScaleTo, CCBezierTo, CCBezierBy, CCEaseBackInOut, CCEaseBackOut, CCJumpTo, CCEaseBackIn, CCJumpBy, CCCallFuncO, CCEaseBounceInOut, CCEaseBounceOut, CCSkewTo, CCCallFuncND, CCEaseBounceIn, CCMoveTo, CCCallFuncN, CCEaseBounce, CCMoveBy, CCEaseElasticInOut, CCRotateBy, CCEaseElasticOut, CCEaseCubicActionInOut, CCRotateTo, CCEaseElasticIn, CCCallFunc, CCEaseCubicActionOut, CCEaseElastic, CCEaseCubicActionIn, CCSplitCols, CCEaseCircleActionInOut, CCSplitRows, CCEaseSineInOut, CCSpawn, CCPlace, CCTwirl, CCEaseCircleActionOut, CCEaseSineOut, CCJumpTiles3D, CCFollow, CCEaseCircleActionIn, CCFlipY, CCEaseSineIn, CCWaves, CCRepeatForever, CCWavesTiles3D, CCBRotateYTo, CCEaseQuinticActionInOut, CCEaseExponentialInOut, CCBRotateXTo, CCFlipX, CCEaseQuinticActionOut, CCLiquid, CCEaseExponentialOut, CCTurnOffTiles, CCBRotateTo, CCSpeed, CCEaseQuinticActionIn, CCEaseExponentialIn, CCShaky3D, CCBSoundEffect, CCRepeat, CCRemoveSelf, CCEaseQuarticActionInOut, CCEaseInOut, CCBSetSpriteFrame, CCRipple3D, CCToggleVisibility, CCEaseQuarticActionOut, CCCardinalSplineTo, CCEaseOut, CCEaseQuarticActionIn, CCHide, CCEaseIn, CCOrbitCamera, CCLens3D, CCSequence, CCEaseQuadraticActionInOut, CCShuffleTiles, CCEaseRateAction, CCFlipY3D, CCEaseQuadraticActionOut, CCShow, CCFlipX3D, CCActionInterval, CCProgressFromTo, CCEaseQuadraticActionIn, CCShatteredTiles3D, CCActionInstant, CCActionEase, CCWaves3D, CCProgressTo, CCGridAction, CCShakyTiles3D, and CCEaseBezierAction.

static CCAction* create ( )
static

Create an action.

var create ( )
static

Create an action.

local create ( )
static

Create an action.

const char* description ( )
CCNode* getOriginalTarget ( void  )
inline
var getOriginalTarget (   )
inline
local getOriginalTarget (   )
inline
int getTag ( void  )
inline
var getTag (   )
inline
local getTag (   )
inline
CCNode* getTarget ( void  )
inline
var getTarget (   )
inline
local getTarget (   )
inline
virtual bool isDone ( void  )
virtual

return true if the action has finished

Reimplemented in CCFollow, CCRepeatForever, CCSpeed, CCRepeat, ActionTimeline, CCActionInterval, and CCActionInstant.

var isDone (   )
virtual

return true if the action has finished

Reimplemented in CCFollow, CCRepeatForever, CCSpeed, CCRepeat, ActionTimeline, CCActionInterval, and CCActionInstant.

local isDone (   )
virtual

return true if the action has finished

Reimplemented in CCFollow, CCRepeatForever, CCSpeed, CCRepeat, ActionTimeline, CCActionInterval, and CCActionInstant.

void setOriginalTarget ( CCNode pOriginalTarget)
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
var setOriginalTarget ( var  pOriginalTarget)
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
local setOriginalTarget ( local  pOriginalTarget)
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
void setTag ( int  nTag)
inline
var setTag ( var  nTag)
inline
local setTag ( local  nTag)
inline
void setTarget ( CCNode pTarget)
inline

The action will modify the target properties.

var setTarget ( var  pTarget)
inline

The action will modify the target properties.

local setTarget ( local  pTarget)
inline

The action will modify the target properties.

virtual void step ( float  dt)
virtual

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

Reimplemented in CCFollow, CCRepeatForever, CCSpeed, ActionTimeline, CCActionInterval, and CCActionInstant.

var step ( var  dt)
virtual

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

Reimplemented in CCFollow, CCRepeatForever, CCSpeed, ActionTimeline, CCActionInterval, and CCActionInstant.

local step ( local  dt)
virtual

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

Reimplemented in CCFollow, CCRepeatForever, CCSpeed, ActionTimeline, CCActionInterval, and CCActionInstant.

virtual void stop ( void  )
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.

var stop (   )
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.

local stop (   )
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 void update ( float  time)
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, CCBezierBy, CCEaseBackInOut, CCEaseBackOut, CCJumpBy, CCEaseBackIn, CCEaseBounceInOut, CCSkewTo, CCEaseBounceOut, CCEaseBounceIn, CCMoveBy, CCEaseElasticInOut, CCRotateBy, CCEaseElasticOut, CCEaseCubicActionInOut, CCRotateTo, CCEaseElasticIn, CCCallFunc, CCEaseCubicActionOut, CCSplitCols, CCEaseCubicActionIn, CCSpawn, CCSplitRows, CCEaseCircleActionInOut, CCEaseSineInOut, CCTwirl, CCPlace, CCEaseCircleActionOut, CCJumpTiles3D, CCEaseSineOut, CCEaseCircleActionIn, CCFlipY, CCBEaseInstant, CCEaseSineIn, CCWaves, CCWavesTiles3D, CCBRotateYTo, CCEaseQuinticActionInOut, CCEaseExponentialInOut, CCBRotateXTo, CCLiquid, CCFlipX, CCEaseQuinticActionOut, CCEaseExponentialOut, CCTurnOffTiles, CCBRotateTo, CCDeccelAmplitude, CCEaseQuinticActionIn, CCShaky3D, CCEaseExponentialIn, CCBSoundEffect, CCRepeat, CCRemoveSelf, CCEaseQuarticActionInOut, CCAccelAmplitude, CCRipple3D, CCEaseInOut, CCBSetSpriteFrame, CCCardinalSplineTo, CCToggleVisibility, CCEaseQuarticActionOut, CCEaseOut, CCAccelDeccelAmplitude, CCFadeOutTRTiles, CCSequence, CCEaseQuarticActionIn, CCOrbitCamera, CCLens3D, CCHide, CCEaseIn, CCEaseQuadraticActionInOut, CCShuffleTiles, CCFlipY3D, CCEaseQuadraticActionOut, CCShow, CCFlipX3D, CCProgressFromTo, CCActionTween, CCShatteredTiles3D, CCEaseQuadraticActionIn, CCActionInstant, CCActionEase, CCWaves3D, CCProgressTo, CCPageTurn3D, CCShakyTiles3D, and CCEaseBezierAction.

var update ( var  time)
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, CCBezierBy, CCEaseBackInOut, CCEaseBackOut, CCJumpBy, CCEaseBackIn, CCEaseBounceInOut, CCSkewTo, CCEaseBounceOut, CCEaseBounceIn, CCMoveBy, CCEaseElasticInOut, CCRotateBy, CCEaseElasticOut, CCEaseCubicActionInOut, CCRotateTo, CCEaseElasticIn, CCCallFunc, CCEaseCubicActionOut, CCSplitCols, CCEaseCubicActionIn, CCSpawn, CCSplitRows, CCEaseCircleActionInOut, CCEaseSineInOut, CCTwirl, CCPlace, CCEaseCircleActionOut, CCJumpTiles3D, CCEaseSineOut, CCEaseCircleActionIn, CCFlipY, CCBEaseInstant, CCEaseSineIn, CCWaves, CCWavesTiles3D, CCBRotateYTo, CCEaseQuinticActionInOut, CCEaseExponentialInOut, CCBRotateXTo, CCLiquid, CCFlipX, CCEaseQuinticActionOut, CCEaseExponentialOut, CCTurnOffTiles, CCBRotateTo, CCDeccelAmplitude, CCEaseQuinticActionIn, CCShaky3D, CCEaseExponentialIn, CCBSoundEffect, CCRepeat, CCRemoveSelf, CCEaseQuarticActionInOut, CCAccelAmplitude, CCRipple3D, CCEaseInOut, CCBSetSpriteFrame, CCCardinalSplineTo, CCToggleVisibility, CCEaseQuarticActionOut, CCEaseOut, CCAccelDeccelAmplitude, CCFadeOutTRTiles, CCSequence, CCEaseQuarticActionIn, CCOrbitCamera, CCLens3D, CCHide, CCEaseIn, CCEaseQuadraticActionInOut, CCShuffleTiles, CCFlipY3D, CCEaseQuadraticActionOut, CCShow, CCFlipX3D, CCProgressFromTo, CCActionTween, CCShatteredTiles3D, CCEaseQuadraticActionIn, CCActionInstant, CCActionEase, CCWaves3D, CCProgressTo, CCPageTurn3D, CCShakyTiles3D, and CCEaseBezierAction.

local update ( local  time)
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, CCBezierBy, CCEaseBackInOut, CCEaseBackOut, CCJumpBy, CCEaseBackIn, CCEaseBounceInOut, CCSkewTo, CCEaseBounceOut, CCEaseBounceIn, CCMoveBy, CCEaseElasticInOut, CCRotateBy, CCEaseElasticOut, CCEaseCubicActionInOut, CCRotateTo, CCEaseElasticIn, CCCallFunc, CCEaseCubicActionOut, CCSplitCols, CCEaseCubicActionIn, CCSpawn, CCSplitRows, CCEaseCircleActionInOut, CCEaseSineInOut, CCTwirl, CCPlace, CCEaseCircleActionOut, CCJumpTiles3D, CCEaseSineOut, CCEaseCircleActionIn, CCFlipY, CCBEaseInstant, CCEaseSineIn, CCWaves, CCWavesTiles3D, CCBRotateYTo, CCEaseQuinticActionInOut, CCEaseExponentialInOut, CCBRotateXTo, CCLiquid, CCFlipX, CCEaseQuinticActionOut, CCEaseExponentialOut, CCTurnOffTiles, CCBRotateTo, CCDeccelAmplitude, CCEaseQuinticActionIn, CCShaky3D, CCEaseExponentialIn, CCBSoundEffect, CCRepeat, CCRemoveSelf, CCEaseQuarticActionInOut, CCAccelAmplitude, CCRipple3D, CCEaseInOut, CCBSetSpriteFrame, CCCardinalSplineTo, CCToggleVisibility, CCEaseQuarticActionOut, CCEaseOut, CCAccelDeccelAmplitude, CCFadeOutTRTiles, CCSequence, CCEaseQuarticActionIn, CCOrbitCamera, CCLens3D, CCHide, CCEaseIn, CCEaseQuadraticActionInOut, CCShuffleTiles, CCFlipY3D, CCEaseQuadraticActionOut, CCShow, CCFlipX3D, CCProgressFromTo, CCActionTween, CCShatteredTiles3D, CCEaseQuadraticActionIn, CCActionInstant, CCActionEase, CCWaves3D, CCProgressTo, CCPageTurn3D, CCShakyTiles3D, and CCEaseBezierAction.

Member Data Documentation

int m_nTag
protected

The action tag.

An identifier of the action

var m_nTag
protected

The action tag.

An identifier of the action

local m_nTag
protected

The action tag.

An identifier of the action

CCNode* m_pOriginalTarget
protected
var m_pOriginalTarget
protected
local m_pOriginalTarget
protected
CCNode* m_pTarget
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'.

var m_pTarget
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'.

local m_pTarget
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: