Loading [MathJax]/extensions/MathMenu.js

⚠️ This documentation corresponds to the latest development branch of axmol. It might diverge from the official releases.

Axmol Engine 3.0.0-dff292a
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.
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.
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()

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()

void update ( float t)
override
Parameters
tIn seconds.

The documentation for this class was generated from the following file:
  • ActionInterval.h