Movement Animation
fun <T : ComponentView> MovementAnimation( componentView: T, byX: Number = 0.0, byY: Number = 0.0, duration: Int = 1000)
Content copied to clipboard
A movement animation. Moves given ComponentView relative to parents anchor point.
Parameters
component View
ComponentView to animate
by X
Relative X movement.
by Y
Relative Y movement.
duration
Animation duration in milliseconds. Default: 1 second
fun <T : ComponentView> MovementAnimation( componentView: T, fromX: Number = componentView.posX, toX: Number = componentView.posX, fromY: Number = componentView.posY, toY: Number = componentView.posY, duration: Int = DEFAULT_ANIMATION_SPEED)
Content copied to clipboard
Creates a MovementAnimation for the given ComponentView.
Parameters
T
Generic ComponentView.
component View
ComponentView to animate
from X
Initial X position. Default: Current ComponentView.posX.
to X
Resulting X position. Default: Current ComponentView.posX.
from Y
Initial Y position. Default: Current ComponentView.posY.
to Y
Resulting Y position. Default: Current ComponentView.posY.
duration
Duration in milliseconds. Default: DEFAULT_ANIMATION_SPEED.