YAPOG  0.0.1
Yet Another Pokemon Online Game
TileLayer.hpp
Go to the documentation of this file.
1 #ifndef YAPOG_TILELAYER_HPP
2 # define YAPOG_TILELAYER_HPP
3 
4 # include "YAPOG/Macros.hpp"
11 
12 namespace yap
13 {
14  class Tile;
15 
16  class YAPOG_LIB TileLayer : public IDrawable
17  , public IUpdateable
18  , public ICloneable
19  {
21 
22  public:
23 
24  TileLayer (uint width, uint height);
25  virtual ~TileLayer ();
26 
27  const Tile& GetTile (uint x, uint y) const;
28  Tile& GetTile (uint x, uint y);
29 
30  void SetTile (uint x, uint y, Tile* tile);
31 
32  const uint& GetWidth () const;
33  const uint& GetHeight () const;
34 
37  virtual void Draw (IDrawingContext& context);
38 
39  virtual bool IsVisible () const;
40  virtual void Show (bool isVisible);
41 
42  virtual void ChangeColor (const sf::Color& color);
44 
47  virtual void Update (const Time& dt);
49 
52  virtual TileLayer* Clone () const;
54 
55  protected:
56 
57  TileLayer (const TileLayer& copy);
58 
59  private:
60 
61  static const bool DEFAULT_VISIBLE_STATE;
62  static const sf::Color DEFAULT_COLOR;
63  static const uint DEFAULT_DRAW_MARGIN;
64 
67 
69 
70  bool isVisible_;
71  sf::Color color_;
72  };
73 } // namespace yap
74 
75 #endif // YAPOG_TILELAYER_HPP