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... | |
local | getElapsed () |
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... | |
var | isDone () |
returns true if the action has finished More... | |
local | isDone () |
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... | |
local | startWithTarget ( local pTarget) |
called before the action start. It will also set the target. More... | |
virtual CCActionInterval * | reverse (void) |
returns a reversed action More... | |
local | reverse () |
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) | |
ctor () | |
CCAction () | |
virtual | ~CCAction (void) |
const char * | description () |
virtual void | stop (void) |
called after the action has finished. More... | |
var | stop () |
called after the action has finished. More... | |
local | stop () |
called after the action has finished. More... | |
virtual void | update (float time) |
called once per frame. More... | |
local | update ( local time) |
called once per frame. More... | |
CCNode * | getTarget (void) |
void | setTarget (CCNode *pTarget) |
The action will modify the target properties. More... | |
var | setTarget ( var pTarget) |
The action will modify the target properties. More... | |
local | setTarget ( local pTarget) |
The action will modify the target properties. More... | |
CCNode * | getOriginalTarget (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) |
![]() | |
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... | |
local | create ( local d) |
creates the action More... | |
Protected Attributes | |
float | m_elapsed |
bool | m_bFirstTick |
var | m_bFirstTick |
local | m_bFirstTick |
![]() | |
float | m_fDuration |
duration in seconds More... | |
![]() | |
CCNode * | m_pOriginalTarget |
CCNode * | m_pTarget |
The "target". More... | |
var | m_pTarget |
The "target". More... | |
local | 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
|
static |
creates the action
|
static |
creates the action
float getAmplitudeRate | ( | void | ) |
var getAmplitudeRate | ( | ) |
local getAmplitudeRate | ( | ) |
|
inline |
how many seconds had elapsed since the actions started to run.
|
inline |
how many seconds had elapsed since the actions started to run.
|
inline |
how many seconds had elapsed since the actions started to run.
bool initWithDuration | ( | float | d) |
initializes the action
var initWithDuration | ( | var | d) |
initializes the action
local initWithDuration | ( | local | d) |
initializes the action
|
virtual |
returns true if the action has finished
Reimplemented from CCAction.
Reimplemented in CCRepeatForever, and CCRepeat.
|
virtual |
returns true if the action has finished
Reimplemented from CCAction.
Reimplemented in CCRepeatForever, and CCRepeat.
|
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.
|
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.
|
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) |
var setAmplitudeRate | ( | var | amp) |
local setAmplitudeRate | ( | local | 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 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 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.
|
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.
|
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 |
|
protected |
|
protected |
|
protected |
|
protected |