X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FNumberAnimation.h;fp=src%2Fbattle%2FNumberAnimation.h;h=2c96b5e816d256587d3de658931ad87248aa86c5;hb=aedc31b88715246abc00a0ab333bea6e17bbb780;hp=0000000000000000000000000000000000000000;hpb=ff31f85fb6a01403c50e34d1226690074c06b7d2;p=l2e.git diff --git a/src/battle/NumberAnimation.h b/src/battle/NumberAnimation.h new file mode 100644 index 0000000..2c96b5e --- /dev/null +++ b/src/battle/NumberAnimation.h @@ -0,0 +1,46 @@ +/* + * NumberAnimation.h + * + * Created on: Aug 12, 2012 + * Author: holy + */ + +#ifndef BATTLE_NUMBERANIMATION_H_ +#define BATTLE_NUMBERANIMATION_H_ + +#include "../graphics/ComplexAnimation.h" + +#include "../geometry/Point.h" + +namespace app { + class Application; + class State; +} + +namespace battle { + +class NumberAnimation { + +public: + NumberAnimation() : number(-1) { } + NumberAnimation(int number, const graphics::ComplexAnimation &prototype, const graphics::Sprite *numbers); + +public: + void Start(app::State &); + bool Running() const; + void CheckTimers(app::State &); + + int Width() const; + int Height() const; + + void Draw(SDL_Surface *dest, const geometry::Point &position) const; + +private: + int number; + graphics::ComplexAnimation animation[4]; + +}; + +} + +#endif /* BATTLE_NUMBERANIMATION_H_ */