4 * Created on: Aug 11, 2012
8 #ifndef GRAPHICS_SIMPLEANIMATION_H_
9 #define GRAPHICS_SIMPLEANIMATION_H_
11 #include "Animation.h"
19 static const int TYPE_ID = 408;
23 : numFrames(0), col(0), row(0) { }
24 SimpleAnimation(const Sprite *sprite, int frameTime, int numFrames, int col = 0, int row = 0, bool repeat = false)
25 : Animation(sprite, frameTime, repeat), numFrames(numFrames), col(col), row(row) { }
28 void SetNumFrames(int n) { numFrames = n; }
29 void SetCol(int c) { col = c; }
30 void SetRow(int r) { row = r; }
32 static void CreateTypeDescription();
33 static void Construct(void *);
36 virtual int NumFrames() const { return numFrames; };
37 virtual int Col(int frame) const { return col; }
38 virtual int Row(int frame) const { return row + frame; }
49 #endif /* GRAPHICS_SIMPLEANIMATION_H_ */