Skip to main content

Animation

class Animation

This class is used to play back an Animation.


public class Animation

— Constructors (1) —

ConstructorDescription
Animation()Creates a new Animation instance.

— Methods (13) —

NameDescription
float getSpeed()Return Animation speed and playback.
void setSpeed(float value)Set Animation speed and playback to be "value" argument.
void play()Start playing the Animation and then ends.
void playInLoop()Start playing the looped Animation.
void stop()Stop Animation execution.
void stopLoop()Stop the Animation loop.
boolean isPlaying()Return a boolean indicating whether the Animation is playing.
boolean isLoop()Return a boolean indicating whether the Animation it's in loop.
int getFrameCount()Returns the current amount of Animation frames.
[AnimationFrame] getFrameAt(int index)Returns the Animation frame through an index defined in the argument.
void addFrame([AnimationFrame] frame)Adds an Animation frame to the Animation.
void sortFrames()Rearranges the frames of the animation.

— Static Methods (1) —

NameDescription
Animation loadFile([AnimationFile] file)Loads a file of Animation.