YAPOG  0.0.1
Yet Another Pokemon Online Game
Battle.hpp
Go to the documentation of this file.
1 #ifndef YAPOG_CLIENT_BATTLE_HPP
2 # define YAPOG_CLIENT_BATTLE_HPP
3 
4 # include "YAPOG/Macros.hpp"
7 
9 
10 namespace yap
11 {
12  class ISprite;
13 }
14 
15 namespace ycl
16 {
17  class BattleInterface;
18  class PokemonFighterTeam;
19  class PokemonFighter;
20 
21  class Battle
22  : public yap::Battle
23  , public yap::IDrawable
24  {
25  public:
26  Battle (BattleInterface& battleInterface);
27  virtual ~Battle ();
28 
31  virtual void Draw (yap::IDrawingContext& context);
32 
33  virtual bool IsVisible () const;
34  virtual void Show (bool isVisible);
35 
36  virtual void ChangeColor (const sf::Color& color);
38 
41  yap::ISprite& GetBackground () const;
42  yap::ISprite& GetPlayerGround () const;
45  const yap::Vector2& GetPlayerGroundPosition () const;
47  const yap::Vector2& GetOpponentInfoPosition () const;
48  const yap::Vector2& GetPokemonInfoPosition () const;
52 
55  void SetPlayerTeam (PokemonFighterTeam* playerTeam);
56  void SetOpponent (IDrawableBattleEntity* opponent);
58 
60 
65 
66  protected:
67  virtual void HandleInit ();
68  virtual void HandleUpdate (const yap::Time& dt);
69 
70  virtual void HandleDraw (yap::IDrawingContext& context);
71  virtual void HandleShow (bool isVisible);
72  virtual void HandleChangeColor (const sf::Color& color);
73 
74  static const bool DEFAULT_VISIBLE_STATE;
75  static const sf::Color DEFAULT_COLOR;
76 
77  bool isVisible_;
78  sf::Color color_;
80 
81  private:
87 
93 
94  // Fighters
97  };
98 } // namespace ycl
99 
100 #endif // YAPOG_CLIENT_WILDBATTLE_HPP