playAnimation

fun playAnimation(animationIndex: Int, speed: Float = 1.0f, loop: Boolean = true)

Applies rotation, translation, and scale to entities that have been targeted by the given animation definition. Uses TransformManager.

Parameters

animationIndex

Zero-based index for the animation of interest.

speed

The rate at which the animation plays. Reverses the animation if negative. Pauses the animation if zero.

loop

Specifies if the animation should repeat forever.

See also

Animator.getAnimationCount

fun playAnimation(animationName: String, speed: Float = 1.0f, loop: Boolean = true)

See also

Animator.getAnimationName