YAPOG  0.0.1
Yet Another Pokemon Online Game
TileLayerStack.hpp
Go to the documentation of this file.
1 #ifndef YAPOG_TILELAYERSTACK_HPP
2 # define YAPOG_TILELAYERSTACK_HPP
3 
4 # include "YAPOG/Macros.hpp"
9 # include "YAPOG/Collection/Map.hpp"
10 
11 namespace yap
12 {
13  class TileLayer;
14  class TileLayoutHandler;
15 
17  , public IUpdateable
18  , public ICloneable
19  {
21 
22  public:
23 
24  TileLayerStack ();
25  virtual ~TileLayerStack ();
26 
27  void SetSize (uint width, uint height);
28 
29  void AddTileLayer (uint height, TileLayoutHandler* layoutHandler);
30 
31  const TileLayer& GetTileLayer (uint height) const;
32  TileLayer& GetTileLayer (uint height);
33 
36  virtual void Draw (IDrawingContext& context);
37 
38  virtual bool IsVisible () const;
39  virtual void Show (bool isVisible);
40 
41  virtual void ChangeColor (const sf::Color& color);
43 
46  virtual void Update (const Time& dt);
48 
51  virtual TileLayerStack* Clone () const;
53 
54  TileLayerStack (const TileLayerStack& copy);
55 
56  private:
57 
58  void AddTileLayer (uint height, TileLayer* tileLayer);
59 
60  static const uint DEFAULT_WIDTH;
61  static const uint DEFAULT_HEIGHT;
62  static const uint DEFAULT_MAX_HEIGHT;
63 
67  };
68 } // namespace yap
69 
70 #endif // YAPOG_TILELAYERSTACK_HPP