Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //In Update method of the class (in this case player.cs):
- TimeAtFrame += (float)_gameTime.ElapsedGameTime.TotalSeconds;
- //In Draw method of class:
- if (TimeAtFrame >= .1f)
- {
- CurrentFrame++;
- TimeAtFrame -= .1f;
- if (CurrentFrame > standing_FrameCount - 1)
- {
- CurrentFrame = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement