TextureAtlas

Holds all the TextureSlice entries of the atlas that was read and loaded in.

Author

Colton Daily

Constructors

Link copied to clipboard
fun TextureAtlas(textures: Map<String, Texture>)

Types

Link copied to clipboard
inner class Entry

Contains the name,TextureSlice, and the Texture for this entry of the atlas.

Functions

Link copied to clipboard
open override fun dispose()
Link copied to clipboard
operator fun get(name: String): TextureAtlas.Entry
Link copied to clipboard

Properties

Link copied to clipboard

All the entries in this TextureAtlas.

Link copied to clipboard

Extensions

Link copied to clipboard

Combine a TextureSlice with a TextureAtlas into a new TextureAtlas.

fun TextureAtlas.combine(texture: Texture, name: String, context: Context): TextureAtlas

Combine a Texture with a TextureAtlas into a new TextureAtlas.

Combine another TextureAtlas with the current atlas to create a new TextureAtlas.

Link copied to clipboard

Create an animation from a prefix of the names of the sprites in a TextureAtlas using an AnimationBuilder to specify the frame index orders and times.

Link copied to clipboard
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.