Java com.badlogic.gdx.graphics.g2d Animation fields, constructors, methods, implement or subclass

Example usage for Java com.badlogic.gdx.graphics.g2d Animation fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.badlogic.gdx.graphics.g2d Animation.

The text is from its open source code.

Constructor

Animation(float frameDuration, Array keyFrames)
Constructor, storing the frame duration and key frames.
Animation(float frameDuration, TextureRegion... keyFrames)
Constructor, storing the frame duration and key frames.
Animation(float frameDuration, Array keyFrames, PlayMode playMode)
Constructor, storing the frame duration, key frames and play type.

Method

floatgetAnimationDuration()
floatgetFrameDuration()
TextureRegiongetKeyFrame(float stateTime, boolean looping)
Returns a TextureRegion based on the so called state time.
TextureRegiongetKeyFrame(float stateTime)
Returns a TextureRegion based on the so called state time.
TextureRegion[]getKeyFrames()
Returns the keyFrames[] array where all the TextureRegions of the animation are stored.
booleanisAnimationFinished(float stateTime)
Whether the animation would be finished if played without looping (PlayMode#NORMAL), given the state time.
voidsetFrameDuration(float frameDuration)
Sets duration a frame will be displayed.
voidsetPlayMode(PlayMode playMode)
Sets the animation play mode.