Skip to main content

FlixelAnimationSources

View source

class

org.flixelgdx.animation.FlixelAnimationSources

public final class FlixelAnimationSources

Helpers to register clips from libGDX TextureAtlas and related sources.

Methods

addFromTextureAtlas(FlixelAnimationController, String, TextureAtlas, String[], float, boolean)

public static void addFromTextureAtlas(FlixelAnimationController controller, String name, TextureAtlas atlas, String[] regionNames, float frameDuration, boolean loop)

Adds an animation using named regions from an atlas (order preserved).

Parameters:

NameDescription
controllerThe animation controller to add the animation to.
nameThe name of the animation.
atlasThe texture atlas to get the frames from.
regionNamesThe names of the regions to get the frames from.
frameDurationSeconds per frame.
loopWhether to loop the animation.