Dice Animation
class DiceAnimation<T : DiceView>( dice: T, val toSide: Int, duration: Int = DEFAULT_ANIMATION_DURATION, speed: Int = DEFAULT_ANIMATION_SPEED) : SteppedComponentAnimation<T>
Content copied to clipboard
A dice roll Animation.
Shuffles through die visuals for given duration and shows toSide 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 DiceView.
dice
DiceView 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 : DiceView> DiceAnimation( dice: T, toSide: Int, duration: Int = DEFAULT_ANIMATION_DURATION, speed: Int = DEFAULT_ANIMATION_SPEED)
Content copied to clipboard
Creates a DiceAnimation for the given DiceView.