4 * Created on: Aug 11, 2012
8 #ifndef GRAPHICS_SIMPLEANIMATION_H_
9 #define GRAPHICS_SIMPLEANIMATION_H_
11 #include "Animation.h"
20 : numFrames(0), col(0), row(0) { }
21 SimpleAnimation(const Sprite *sprite, int frameTime, int numFrames, int col = 0, int row = 0, bool repeat = false)
22 : Animation(sprite, frameTime, repeat), numFrames(numFrames), col(col), row(row) { }
25 void SetNumFrames(int n) { numFrames = n; }
26 void SetCol(int c) { col = c; }
27 void SetRow(int r) { row = r; }
29 static void CreateTypeDescription();
32 virtual int NumFrames() const { return numFrames; };
33 virtual int Col(int frame) const { return col; }
34 virtual int Row(int frame) const { return row + frame; }
45 #endif /* GRAPHICS_SIMPLEANIMATION_H_ */