animation
fun <T> animation(frames: Int, interval: Long, unit: TimeUnit, init: AnimationImpl<T>.() -> Unit): Animation<T>
Builds a new animation
To start this animation use the AnimationManager
Return
newly build animation
Author
Devin
Since
1.0.0
Parameters
T
the class the animation should be run on
frames
the amount of frames of the animation. This will determine how many times the animation tick function is ran
interval
the delay between 2 animation frames
unit
the timeUnit for the interval
init
the init function