M2AnimationsChain

Represents a sequential or parallel animation chain that can execute multiple M2Animator or M2AnimationsChain objects.

Each animation block runs sequentially in the order it was added using then, or in parallel using with.

Typical usage:

M2AnimationsChain()
.then { rect.fadeout(500) }
.with { circle.fadeInto(screen, 500) }
.start()

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun exe(block: () -> Any?): M2AnimationsChain

Adds a block to run in parallel with the most recent step added via then.

Link copied to clipboard
fun start()

Begins executing the animation chain from the first step.

Link copied to clipboard
fun stop()

Stops all currently running animations in this chain.

Link copied to clipboard

Adds a nested M2AnimationsChain as a sequential step that runs after the previous step finishes.

Adds an M2Animator as a sequential step that runs after the previous step finishes.

fun then(block: () -> Any?): M2AnimationsChain

Adds a block (scope) that will run sequentially after the previous block finishes.

Link copied to clipboard

Adds a nested M2AnimationsChain to run in parallel with the most recent step.

Adds an M2Animator to run in parallel with the most recent step.