Cocos2d-x  v3.11
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
Animate Class Reference

Animates a sprite given the Animation. More...

Inherits ActionInterval.

Public Member Functions

void setAnimation (Animation *animation)
 Sets the Animation object to be animated. More...
 
AnimationgetAnimation ()
 returns the Animation object that is being animated More...
 
int getCurrentFrameIndex ()
 Gets the index of current frame's index. More...
 
virtual Animateclone () const override
 override ActionInterval.
 
virtual Animatereverse () const override
 override Action.
 
- Public Member Functions inherited from ActionInterval
float getElapsed (void)
 How many seconds had elapsed since the actions started to run. More...
 
void setAmplitudeRate (float amp)
 Sets the amplitude rate, extension in GridAction. More...
 
float getAmplitudeRate (void)
 Gets the ampliture rate, extension in GridAction. More...
 
virtual bool isDone (void) const override
 override Action.
 

Static Public Member Functions

static Animatecreate (Animation *animation)
 Creates the action with an Animation and will restore the original frame when the animation is over. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ActionInterval
bool initWithDuration (float d)
 initializes the action with the duration. More...
 

Detailed Description

Animates a sprite given the Animation.

Member Function Documentation

static Animate* create ( Animation animation)
static

Creates the action with an Animation and will restore the original frame when the animation is over.

A certain animation. An autoreleased Animate object.

void setAnimation ( Animation animation)

Sets the Animation object to be animated.

certain animation.

Animation* getAnimation ( )
inline

returns the Animation object that is being animated

Gets the animation object that is being animated.

int getCurrentFrameIndex ( )
inline

Gets the index of current frame's index.

int the index of current frame.


The documentation for this class was generated from the following file: