AnimationImpl

class AnimationImpl<T>(frames: Int, val interval: Long, val timeUnit: TimeUnit, val endless: Boolean) : Animation<T>

Constructors

Link copied to clipboard
constructor(frames: Int, interval: Long, timeUnit: TimeUnit, endless: Boolean)

Properties

Link copied to clipboard
open override val endless: Boolean

Whether the animation should run endless or not

Link copied to clipboard
Link copied to clipboard
open override var startInstant: Boolean

whether the animation should start instantly, or wait for the given delay until rendering the first frame

Link copied to clipboard

Functions

Link copied to clipboard
open override fun isRunning(): Boolean

Whether the animation is running or not

Link copied to clipboard
open override fun onAnimationFrame(listener: T.(index: Int) -> Unit)

Called when the next frame is rendered

Link copied to clipboard
open override fun onEnd(listener: T.() -> Unit)

Called when the animation is finished

Link copied to clipboard
fun renderFrame(t: T)
Link copied to clipboard
Link copied to clipboard
open override fun stop()

Stops the animation if it was running