Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
Animate Class Reference

Animates a sprite given the name of an Animation. More...

#include <ActionInterval.h>

Inherits ActionInterval.

Public Member Functions

void setAnimation (Animation *animation)
 Sets the Animation object to be animated.
 
AnimationgetAnimation ()
 returns the Animation object that is being animated
 
int getCurrentFrameIndex ()
 Gets the index of sprite frame currently displayed.
 
virtual void update (float t) override
 
bool initWithAnimation (Animation *animation)
 initializes the action with an Animation and will restore the original frame when the animation is over
 
- Public Member Functions inherited from ActionInterval
float getElapsed ()
 How many seconds had elapsed since the actions started to run.
 
void setAmplitudeRate (float amp)
 Sets the amplitude rate, extension in GridAction.
 
float getAmplitudeRate ()
 Gets the amplitude rate, extension in GridAction.
 
virtual void step (float dt) override
 
bool initWithDuration (float d)
 initializes the 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.
 

Detailed Description

Animates a sprite given the name of an Animation.

Member Function Documentation

◆ create()

static Animate * create ( Animation * animation)
static

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

Parameters
animationA certain animation.
Returns
An autoreleased Animate object.

◆ setAnimation()

void setAnimation ( Animation * animation)

Sets the Animation object to be animated.

Parameters
animationcertain animation.

◆ getAnimation()

Animation * getAnimation ( )
inline

returns the Animation object that is being animated

Returns
Gets the animation object that is being animated.

◆ getCurrentFrameIndex()

int getCurrentFrameIndex ( )
inline

Gets the index of sprite frame currently displayed.

Returns
int the index of sprite frame currently displayed.

◆ update()

virtual void update ( float t)
overridevirtual
Parameters
tIn seconds.

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