Advertisement
Vchavauty

Animation.h

Jul 26th, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #ifndef _ANIMATION_HEADER
  2. #define _ANIMATION_HEADER
  3. #include <SDL/SDL.h>
  4.  
  5.  
  6. class Animation
  7. {
  8. private :
  9.     int MAX_X;
  10.     int MAX_Y;
  11.     int FrameRate; //in Milliseconds
  12.     int MaxFrames;
  13.     int CurrentFrame;
  14.     int FrameTA; // Current Frame = Current Frame + FrameTa
  15.     int OldTime; //Timer
  16.     int PosX;
  17.     int PosY;
  18. public :
  19.     Animation();
  20.     bool Working; //True if working;0 if not;
  21.     int Direction; //0 if Right; 1 if left;
  22.     void Anima(); //Function to actually Animate
  23.     void SetFrameRate(int Rate);
  24.     void SetCurrentFrame(int Frame);
  25.     int GetCurrentFrame();
  26.     int retrievePosX();
  27.     int retrievePosY();
  28.  
  29. };
  30. #endif // _ANIMATION_HEADER
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement