1 #ifndef BATTLE_PERFORMATTACKS_H_
2 #define BATTLE_PERFORMATTACKS_H_
4 #include "../../app/State.h"
6 #include "../NumberAnimation.h"
7 #include "../../math/Vector.h"
8 #include "../../graphics/Animation.h"
15 class TargetSelection;
21 explicit PerformAttacks(BattleState *battle)
22 : battle(battle), moveAnimation(0), targetAnimation(0), titleBarText(0), cursor(-1) { }
25 virtual void HandleEvents(const app::Input &);
26 virtual void UpdateWorld(Uint32 deltaT);
27 virtual void Render(SDL_Surface *);
30 virtual void OnEnterState(SDL_Surface *screen);
31 virtual void OnExitState(SDL_Surface *screen);
32 virtual void OnResumeState(SDL_Surface *screen);
33 virtual void OnPauseState(SDL_Surface *screen);
35 virtual void OnResize(int width, int height);
38 void CheckAnimations();
39 bool HasAnimationsRunning() const;
40 void ResetAnimation();
43 void AddNumberAnimations(const TargetSelection &);
45 void RenderTitleBar(SDL_Surface *screen, const math::Vector<int> &offset) const;
46 void RenderNumbers(SDL_Surface *screen, const math::Vector<int> &offset) const;
47 void RenderTargetAnimation(SDL_Surface *screen, const math::Vector<int> &offset) const;
51 graphics::AnimationRunner moveAnimation;
52 graphics::AnimationRunner targetAnimation;
53 const char *titleBarText;
54 app::Timer<Uint32> titleBarTimer;
55 app::Timer<Uint32> targetAnimationTimer;
56 std::vector<NumberAnimation> numberAnimation;
57 std::vector<math::Vector<int> > numberPosition;