Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2012
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. #include "timer.h"
  2. #include "SDLib.h"
  3.  
  4. class Animation
  5. {
  6.     public:
  7.         struct Vector2
  8.         {
  9.             int x;
  10.             int y;
  11.         };
  12.  
  13.         struct Rectangle
  14.         {
  15.             int x;
  16.             int y;
  17.             int width, height;
  18.         };
  19.  
  20.         Animation(void);
  21.         Animation(int cFrame, int numOfFrames, float timePerFrame[], bool animateOnlyOnce = false, bool setIndividualFrameTimes = true);
  22.         Animation(int cFrame, int numOfFrames, float timePerFrame, bool animateOnlyOnce = false);
  23.         void Update(SDLib& sdlLib);
  24.    
  25.         timer Timer;
  26.         int currentFrame, oldFrame, numberOfFrames;
  27.         float maxTimePerFrame, currentTime;
  28.         bool animateOnce, individualFrameTimes, animating;
  29.  
  30.         float a_maxTimePerFrame[20];
  31.         Rectangle RectArray[20];
  32.         Vector2 Vector2Array[20];
  33. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement