Randomize Animation
class RandomizeAnimation<T : GameComponentView>( gameComponentView: T, val visuals: List<Visual>, val toVisual: Visual, duration: Int = DEFAULT_ANIMATION_DURATION, speed: Int = DEFAULT_ANIMATION_SPEED) : SteppedComponentAnimation<T>
Content copied to clipboard
A randomization Animation that shuffles between different visuals.
Shuffles through visuals in the given visuals for given duration and shows toVisual in the end. Use the speed parameter to define how many steps the animation should have.
For example:
An animation with duration = 1s and speed = 50 will change the visual 50 times within the duration of one second.
Parameters
T
Generic GameComponentView.
game Component View
GameComponentView to animate.
duration
Duration in milliseconds. Default: DEFAULT_ANIMATION_DURATION.
speed
Count of steps. Default: DEFAULT_ANIMATION_SPEED.
Constructors
Link copied to clipboard
fun <T : GameComponentView> RandomizeAnimation( gameComponentView: T, visuals: List<Visual>, toVisual: Visual, duration: Int = DEFAULT_ANIMATION_DURATION, speed: Int = DEFAULT_ANIMATION_SPEED)
Content copied to clipboard
Creates a RandomizeAnimation for the given GameComponentView.