getAnimation

fun TextureAtlas.getAnimation(prefix: String = "", defaultTimePerFrame: Duration = 100.milliseconds): Animation<TextureSlice>

Creates an animation from a prefix based on the names of the sprites in a TextureAtlas.

Parameters

prefix

the prefix to use to create the animation

defaultTimePerFrame

the amount of time each frame is displayed