Skip to content

Commit

Permalink
Updated animation code to look smoother.
Browse files Browse the repository at this point in the history
The example sprite is based off an old Photon Storm tutorial (available here: http://www.photonstorm.com/flash-game-dev-tips/flash-game-dev-tip-12-building-a-retro-platform-game-in-flixel-part-1). I updated loadGraphic to accurately reflect the rectangular dimensions of the sprite and also changed the walk animation to reflect the intended motion from the original tutorial ([0,1,0,2]).
  • Loading branch information
prestia committed Feb 10, 2014
1 parent 589ddee commit 1d15ae6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions documentation/02_handbook/05-FlxSprite.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Flixel supports spritesheet animation.
![](/images/sprite-animation-example.png)

```haxe
player.loadGraphic("assets/player.png", true, true, 32, 32);
player.animation.add("walk", [0, 1, 2, 3], 5, true);
player.loadGraphic("assets/player.png", true, true, 32, 36);
player.animation.add("walk", [0, 1, 0, 2], 5, true);
player.animation.play("walk");
```

0 comments on commit 1d15ae6

Please sign in to comment.