Skip to content

Commit

Permalink
Update gh-pages doc for sequential and parallel animations
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiankluempers committed Oct 31, 2021
1 parent 2e8b9c5 commit 0ee784f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions docs/concepts/animations/Animations.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,21 @@ duration, a running attribute and an ``onFinished`` EventHandler that gets invok

## [SequentialAnimation][SequentialKDoc]

A SequentialAnimation is an Animation that consists of multiple animations, that get played in sequence.
A SequentialAnimation is an [Animation][AnimationKDoc] that consists of multiple animations, that get played in sequence.
This is useful to combine multiple animations into a single one.
An example on how to create and play a SequentialAnimation can be found below:

````kotlin
gameScene.playAnimation(
SequentialAnimation(
DelayAnimation(duration = 1000).apply {
onFinished = { println("First DelayAnimation finished!") }
DelayAnimation(duration = 1000).apply {
onFinished = { println("First DelayAnimation finished!") }
},
DelayAnimation(duration = 2000).apply {
DelayAnimation(duration = 2000).apply {
onFinished = { println("Second DelayAnimation finished!") }
},
).apply {
onFinished = { println("SequentialAnimation finished!") }
).apply {
onFinished = { println("SequentialAnimation finished!") }
}
)
````
Expand All @@ -81,21 +81,21 @@ The resulting SequentialAnimation will play for 3000ms and print some informatio

## [ParallelAnimation][ParallelKDoc]

A ParallelAnimation is an Animation that consists of multiple animations, that get played in parallel.
A ParallelAnimation is an [Animation][AnimationKDoc] that consists of multiple animations, that get played in parallel.
This is useful to combine multiple animations into a single one.
An example on how to create and play a ParallelAnimation can be found below:

````kotlin
gameScene.playAnimation(
ParallelAnimation(
DelayAnimation(duration = 1000).apply {
onFinished = { println("First DelayAnimation finished!") }
DelayAnimation(duration = 1000).apply {
onFinished = { println("First DelayAnimation finished!") }
},
DelayAnimation(duration = 2000).apply {
DelayAnimation(duration = 2000).apply {
onFinished = { println("Second DelayAnimation finished!") }
},
).apply {
onFinished = { println("SequentialAnimation finished!") }
).apply {
onFinished = { println("ParallelAnimation finished!") }
}
)
````
Expand Down

0 comments on commit 0ee784f

Please sign in to comment.