1 #ifndef GRAPHICS_SIMPLEANIMATION_H_
2 #define GRAPHICS_SIMPLEANIMATION_H_
12 static const int TYPE_ID = 408;
16 : numFrames(0), col(0), row(0) { }
17 SimpleAnimation(const Sprite *sprite, int frameTime, int numFrames, int col = 0, int row = 0, bool repeat = false)
18 : Animation(sprite, frameTime, repeat), numFrames(numFrames), col(col), row(row) { }
21 void SetNumFrames(int n) { numFrames = n; }
22 void SetCol(int c) { col = c; }
23 void SetRow(int r) { row = r; }
25 static void CreateTypeDescription();
26 static void Construct(void *);
29 virtual int NumFrames() const { return numFrames; };
30 virtual int Col(int frame) const { return col; }
31 virtual int Row(int frame) const { return row + frame; }
42 #endif /* GRAPHICS_SIMPLEANIMATION_H_ */