YAPOG  0.0.1
Yet Another Pokemon Online Game
PokemonFighter.cpp
Go to the documentation of this file.
2 #include "Battle/PokemonFighter.hpp"
3 #include "Pokemon/Pokemon.hpp"
4 
5 namespace ycl
6 {
8  const sf::Color PokemonFighter::DEFAULT_COLOR = sf::Color ();
11 
12  PokemonFighter::PokemonFighter (Pokemon* originalPokemon, bool isOpponent)
13  : yap::PokemonFighter (originalPokemon)
14  , isVisible_ (DEFAULT_VISIBLE_STATE)
15  , originalPokemon_ (originalPokemon)
16  , battleSprite_ (nullptr)
17  , isOpponent_ (isOpponent)
18  {
19  if (isOpponent_)
21  else
23  }
24 
26  {
27  }
28 
32  {
33  if (!IsVisible ())
34  return;
35 
36  HandleDraw (context);
37  }
38 
40  {
41  return isVisible_;
42  }
43 
44  void PokemonFighter::Show (bool isVisible)
45  {
46  isVisible_ = isVisible;
47 
48  HandleShow (isVisible);
49  }
50 
51  void PokemonFighter::ChangeColor (const sf::Color& color)
52  {
53  color_ = color;
54 
55  HandleChangeColor (color);
56  }
58 
60  {
61  }
62 
64  {
65  }
66 
68  {
69  battleSprite_->Draw (context);
70  }
71 
72  void PokemonFighter::HandleShow (bool isVisible)
73  {
74  }
75 
76  void PokemonFighter::HandleChangeColor (const sf::Color& color)
77  {
78  }
79 
83  {
84  return *battleSprite_;
85  }
87 
89  const BattleSpriteType& battleSpriteType)
90  {
91  switch (battleSpriteType)
92  {
95  break;
98  break;
99  default:
101  break;
102  }
103  }
104 
105 } // namespace yap