Created
May 19, 2012 20:45
-
-
Save demonixis/2732324 to your computer and use it in GitHub Desktop.
Yna Framework Animations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public SpriteState() | |
{ | |
sonicSprite = new Sprite(new Vector2(50, 50), "2d//soniclg4"); | |
sonicSprite.LoadContent(); | |
sonicSprite.PrepareAnimation(50, 41); | |
sonicSprite.AddAnimation("down", new int[] { 0, 1, 2, 3 }, 25, false); | |
sonicSprite.AddAnimation("left", new int[] { 4, 5, 6, 7 }, 25, false); | |
sonicSprite.AddAnimation("right", new int[] { 8, 9, 10, 11 }, 25, false); | |
sonicSprite.AddAnimation("up", new int[] { 12, 13, 14, 15 }, 25, false); | |
sonicSprite.Play("up"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment