YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
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
"
5
# include "
YAPOG/Graphics/Game/Sprite/BaseSprite.hpp
"
6
# include "
YAPOG/Collection/Map.hpp
"
7
8
namespace
yap
9
{
12
template
<
typename
K>
13
class
SpriteSet
:
public
BaseSprite
14
{
15
DISALLOW_ASSIGN
(
SpriteSet
);
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
54
KeyType
currentKey_
;
55
KeyType
defaultKey_
;
56
ISprite
*
currentSprite_
;
57
collection::Map<KeyType, ISprite*>
sprites_
;
58
};
59
}
// namespace yap
60
61
# include "
YAPOG/Graphics/Game/Sprite/SpriteSet.hxx
"
62
63
#endif // YAPOG_SPRITESET_HPP
YAPOG
include
YAPOG
Graphics
Game
Sprite
SpriteSet.hpp
Generated on Mon Sep 17 2012 22:24:23 for YAPOG by
1.8.1.1