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 controller and releases resources.

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

Returns whether the animation has completed.

Link copied to clipboard
fun isPaused(): Boolean

Returns whether the animation is paused.

Link copied to clipboard
fun isPlaying(): Boolean

Returns whether the animation is playing.

Link copied to clipboard
fun isStopped(): Boolean

Returns whether 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 the playback speed.

Link copied to clipboard
fun setTime(time: Float)

Sets the current playback time.

Link copied to clipboard
fun stop()

Stops an animation.