YAPOG  0.0.1
Yet Another Pokemon Online Game
SpriteSet.hpp
Go to the documentation of this file.
1 #ifndef YAPOG_SPRITESET_HPP
2 # define YAPOG_SPRITESET_HPP
3 
4 # include "YAPOG/Macros.hpp"
6 # include "YAPOG/Collection/Map.hpp"
7 
8 namespace yap
9 {
12  template <typename K>
13  class SpriteSet : public BaseSprite
14  {
16 
17  public:
18 
19  typedef K KeyType;
20 
21  SpriteSet ();
22  virtual ~SpriteSet ();
23 
24  void AddSprite (const KeyType& key, ISprite* sprite);
25  void RemoveSprite (const KeyType& key);
26 
27  void SetCurrentSprite (const KeyType& key);
28  void SetDefaultKey (const KeyType& key);
29  void SetDefaultSprite ();
30 
33  virtual SpriteSet* Clone () const;
35 
36  protected:
37 
38  SpriteSet (const SpriteSet& copy);
39 
40  virtual Vector2 HandleGetSize () const;
41 
42  virtual void HandleMove (const Vector2& offset);
43  virtual void HandleScale (const Vector2& factor);
44 
45  virtual void HandleDraw (IDrawingContext& context);
46 
47  virtual void HandleShow (bool isVisible);
48  virtual void HandleChangeColor (const sf::Color& color);
49 
50  virtual void HandleUpdate (const Time& dt);
51 
52  private:
53 
58  };
59 } // namespace yap
60 
62 
63 #endif // YAPOG_SPRITESET_HPP