AnimationPlaybackController

@MainThread
class AnimationPlaybackController : Closeable

A controller that manages animation playback.

Properties

Link copied to clipboard

The entity that the animation is playing on.

Link copied to clipboard
@get:JvmName(name = "isValid")
val valid: Boolean

The controller is valid.

Functions

Link copied to clipboard
open override fun close()

Closes the current controller.

Link copied to clipboard
fun getDuration(): Float

Gets the duration of the animation.

Link copied to clipboard
fun getSpeed(): Float

Gets the current playback speed of the animation.

Link copied to clipboard
fun getTime(): Float

Gets the time the animation is currently at.

Link copied to clipboard
fun isComplete(): Boolean

Gets if the playback of an animation is completed or not.

Link copied to clipboard
fun isPaused(): Boolean

Gets the animation is paused.

Link copied to clipboard
fun isPlaying(): Boolean

Gets if the animation is playing or not.

Link copied to clipboard
fun isStopped(): Boolean

Gets if the animation is currently stopped.

Link copied to clipboard
fun pause()

Pauses the animation.

Link copied to clipboard
fun resume()

Resumes a paused animation.

Link copied to clipboard
fun setSpeed(speed: Float)

Sets a new playback speed for the animation.

Link copied to clipboard
fun setTime(time: Float)

Sets the time the animation is to be at currently.

Link copied to clipboard
fun stop()

Stops an animation.