Skip to content

Commit dd2daa0

Browse files
committed
feat(doc): animations example
1 parent 4332715 commit dd2daa0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

playground/graphics/graphics-5-animations.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ graphicEntityModule.createSpriteAnimation()
99
.setImages(heroSprites)
1010
.setX(hero.getX())
1111
.setY(hero.getY())
12-
.setDuration(2000)
12+
.setDuration(100)
1313
.setLoop(true)
1414
.setPlaying(true);
1515
```
16+
It should look like this :
17+
![Example](resources/hero.gif)
18+
1619
- `setImages(heroSprites)`: set a `String` array containing the filenames of the sprites.
1720
- `setX(hero.getX())`, `setY(hero.getY())`: set the position.
1821
- `setDuration(2000)`: set how long the whole animation takes to be played (in milliseconds).
83.3 KB
Loading

0 commit comments

Comments
 (0)