Advertisement
Guest User

Untitled

a guest
Feb 25th, 2012
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1. //In Update method of the class (in this case player.cs):
  2. TimeAtFrame += (float)_gameTime.ElapsedGameTime.TotalSeconds;
  3.  
  4. //In Draw method of class:
  5.                 if (TimeAtFrame >= .1f)
  6.                 {
  7.                     CurrentFrame++;
  8.                     TimeAtFrame -= .1f;
  9.                     if (CurrentFrame > standing_FrameCount - 1)                    
  10.             {
  11.                         CurrentFrame = 0;
  12.                         }
  13.                 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement