Cocos2d-x  v3.12
 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...
 
local setAnimation ( local animation)
 Sets the Animation object to be animated. More...
 
AnimationgetAnimation ()
 returns the Animation object that is being animated More...
 
local getAnimation ()
 returns the Animation object that is being animated More...
 
int getCurrentFrameIndex ()
 Gets the index of current frame's index. More...
 
var getCurrentFrameIndex ()
 Gets the index of current frame's index. More...
 
local getCurrentFrameIndex ()
 Gets the index of current frame's index. More...
 
virtual Animateclone () const override
 override ActionInterval.
 
local clone ()
 override ActionInterval.
 
virtual Animatereverse () const override
 override Action.
 
local reverse ()
 override Action.
 
- Public Member Functions inherited from ActionInterval
float getElapsed (void)
 How many seconds had elapsed since the actions started to run. More...
 
var getElapsed ()
 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...
 
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.
 
local isDone ()
 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...
 
var create ( var animation)
 Creates the action with an Animation and will restore the original frame when the animation is over. More...
 
local create ( local 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...
 
var initWithDuration ( var d)
 initializes the action with the duration. More...
 
local initWithDuration ( local 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.

var create ( var  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.

local create ( local  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.

var setAnimation ( var  animation)

Sets the Animation object to be animated.

certain animation.

local setAnimation ( local  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.

var getAnimation ( )
inline

returns the Animation object that is being animated

Gets the animation object that is being animated.

local 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.

var getCurrentFrameIndex ( )
inline

Gets the index of current frame's index.

int the index of current frame.

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