An interval action is an action that takes place within a certain period of time. More...
#include <CCActionInterval.h>
Public Member Functions | |
float | getElapsed (void) |
how many seconds had elapsed since the actions started to run. More... | |
bool | initWithDuration (float d) |
initializes the action More... | |
virtual bool | isDone (void) |
returns true if the action has finished More... | |
virtual CCObject * | copyWithZone (CCZone *pZone) |
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 | startWithTarget (CCNode *pTarget) |
called before the action start. It will also set the target. More... | |
virtual CCActionInterval * | reverse (void) |
returns a reversed action More... | |
void | setAmplitudeRate (float amp) |
float | getAmplitudeRate (void) |
![]() | |
CCFiniteTimeAction () | |
virtual | ~CCFiniteTimeAction () |
float | getDuration (void) |
get duration in seconds of the action More... | |
void | setDuration (float duration) |
set duration in seconds of the action More... | |
![]() | |
CCAction (void) | |
virtual | ~CCAction (void) |
const char * | description () |
virtual void | stop (void) |
called after the action has finished. 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) |
![]() | |
CCObject (void) | |
virtual | ~CCObject (void) |
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) |
Static Public Member Functions | |
static CCActionInterval * | create (float d) |
creates the action More... | |
![]() | |
static CCAction * | create () |
Create an action. More... | |
Protected Attributes | |
float | m_elapsed |
bool | m_bFirstTick |
![]() | |
float | m_fDuration |
duration in seconds More... | |
![]() | |
CCNode * | m_pOriginalTarget |
CCNode * | m_pTarget |
The "target". More... | |
int | m_nTag |
The action tag. More... | |
![]() | |
unsigned int | m_uReference |
unsigned int | m_uAutoReleaseCount |
Additional Inherited Members | |
![]() | |
unsigned int | m_uID |
int | m_nLuaID |
An interval action is an action that takes place within a certain period of time.
It has an start time, and a finish time. The finish time is the parameter duration plus the start time.
These CCActionInterval actions have some interesting properties, like:
For example, you can simulate a Ping Pong effect running the action normally and then running it again in Reverse mode.
Example:
CCAction *pingPongAction = CCSequence::actions(action, action->reverse(), NULL);
Reimplemented from CCAction.
Reimplemented in CCTargetedAction, CCAnimate, CCReverseTime, CCDelayTime, CCTintBy, CCTintTo, CCFadeTo, CCFadeOut, CCFadeIn, CCBlink, CCScaleBy, CCScaleTo, CCBezierTo, CCBezierBy, CCEaseBackInOut, CCEaseBackOut, CCJumpTo, CCEaseBackIn, CCJumpBy, CCEaseBounceInOut, CCEaseBounceOut, CCSkewTo, CCEaseBounceIn, CCMoveTo, CCEaseBounce, CCMoveBy, CCEaseElasticInOut, CCRotateBy, CCEaseElasticOut, CCEaseCubicActionInOut, CCRotateTo, CCEaseElasticIn, CCEaseCubicActionOut, CCEaseElastic, CCEaseCubicActionIn, CCSplitCols, CCEaseCircleActionInOut, CCSplitRows, CCEaseSineInOut, CCSpawn, CCTwirl, CCEaseCircleActionOut, CCEaseSineOut, CCJumpTiles3D, CCEaseCircleActionIn, CCEaseSineIn, CCWaves, CCRepeatForever, CCWavesTiles3D, CCBRotateYTo, CCEaseQuinticActionInOut, CCEaseExponentialInOut, CCBRotateXTo, CCEaseQuinticActionOut, CCLiquid, CCEaseExponentialOut, CCTurnOffTiles, CCBRotateTo, CCEaseQuinticActionIn, CCEaseExponentialIn, CCShaky3D, CCRepeat, CCEaseQuarticActionInOut, CCEaseInOut, CCRipple3D, CCEaseQuarticActionOut, CCCardinalSplineTo, CCEaseOut, CCEaseQuarticActionIn, CCEaseIn, CCOrbitCamera, CCLens3D, CCSequence, CCEaseQuadraticActionInOut, CCShuffleTiles, CCEaseRateAction, CCFlipY3D, CCEaseQuadraticActionOut, CCFlipX3D, CCProgressFromTo, CCEaseQuadraticActionIn, CCShatteredTiles3D, CCActionEase, CCWaves3D, CCProgressTo, CCGridAction, CCShakyTiles3D, and CCEaseBezierAction.
|
static |
creates the action
float getAmplitudeRate | ( | void | ) |
|
inline |
how many seconds had elapsed since the actions started to run.
bool initWithDuration | ( | float | d | ) |
initializes the action
|
virtual |
returns true if the action has finished
Reimplemented from CCAction.
Reimplemented in CCRepeatForever, and CCRepeat.
|
virtual |
returns a reversed action
Reimplemented from CCFiniteTimeAction.
Reimplemented in CCAnimate, CCReverseTime, CCDelayTime, CCTintBy, CCFadeOut, CCFadeIn, CCBlink, CCScaleBy, CCBezierBy, CCEaseBackInOut, CCEaseBackOut, CCJumpBy, CCEaseBackIn, CCEaseBounceInOut, CCSkewBy, CCEaseBounceOut, CCEaseBounceIn, CCEaseBounce, CCMoveBy, CCEaseElasticInOut, CCRotateBy, CCEaseElasticOut, CCEaseCubicActionInOut, CCEaseElasticIn, CCEaseCubicActionOut, CCEaseElastic, CCEaseCubicActionIn, CCSpawn, CCEaseSineInOut, CCEaseCircleActionInOut, CCEaseCircleActionOut, CCEaseSineOut, CCEaseCircleActionIn, CCEaseSineIn, CCRepeatForever, CCEaseQuinticActionInOut, CCEaseExponentialInOut, CCCardinalSplineBy, CCEaseQuinticActionOut, CCEaseExponentialOut, CCDeccelAmplitude, CCEaseQuinticActionIn, CCEaseExponentialIn, CCRepeat, CCEaseQuarticActionInOut, CCEaseInOut, CCAccelAmplitude, CCCardinalSplineTo, CCEaseQuarticActionOut, CCEaseOut, CCAccelDeccelAmplitude, CCSequence, CCEaseQuarticActionIn, CCEaseIn, CCEaseQuadraticActionInOut, CCEaseRateAction, CCEaseQuadraticActionOut, CCProgressFromTo, CCActionTween, CCEaseQuadraticActionIn, CCActionCamera, CCActionEase, CCGridAction, and CCEaseBezierAction.
void setAmplitudeRate | ( | float | amp | ) |
|
virtual |
called before the action start. It will also set the target.
Reimplemented from CCAction.
Reimplemented in CCTargetedAction, CCAnimate, CCReverseTime, CCTintBy, CCTintTo, CCFadeTo, CCBlink, CCScaleBy, CCScaleTo, CCBezierTo, CCBezierBy, CCJumpTo, CCJumpBy, CCSkewBy, CCSkewTo, CCMoveTo, CCMoveBy, CCRotateBy, CCRotateTo, CCSplitCols, CCSplitRows, CCSpawn, CCRepeatForever, CCBRotateYTo, CCBRotateXTo, CCCardinalSplineBy, CCTurnOffTiles, CCBRotateTo, CCDeccelAmplitude, CCRepeat, CCAccelAmplitude, CCCardinalSplineTo, CCAccelDeccelAmplitude, CCOrbitCamera, CCSequence, CCShuffleTiles, 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 from CCAction.
Reimplemented in CCRepeatForever.
|
protected |
|
protected |