FlipAnimation

class FlipAnimation<T : GameComponentView>(    gameComponentView: T,     val fromVisual: Visual,     val toVisual: Visual,     duration: Int = DEFAULT_ANIMATION_SPEED) : ComponentAnimation<T>

A flip Animation.

Sets background to given fromVisual than contracts background in half the given duration, switches to toVisual and extends again in half the given duration.

Parameters

gameComponentView

GameComponentView to animate.

duration

Duration in milliseconds. Default: DEFAULT_ANIMATION_SPEED.

Constructors

Link copied to clipboard
fun <T : GameComponentView> FlipAnimation(    gameComponentView: T,     fromVisual: Visual,     toVisual: Visual,     duration: Int = DEFAULT_ANIMATION_SPEED)

Creates a FlipAnimation for the given GameComponentView.

Properties

Link copied to clipboard
val componentView: T

ComponentView to animate.

Link copied to clipboard
val duration: Int

Duration in milliseconds.

Link copied to clipboard
val fromVisual: Visual

Initial Visual.

Link copied to clipboard
var isRunning: Boolean

Boolean indicating whether the Animation is currently running.

Link copied to clipboard
var onFinished: (AnimationFinishedEvent) -> Unit?

Gets invoked when Animation has finished.

Link copied to clipboard
val toVisual: Visual

Resulting Visual.