/Animation sample
Created May 19, 2012
Yna Framework Animations
| 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