YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
RegularAnimatedSprite.cpp
Go to the documentation of this file.
1
#include "
YAPOG/Graphics/Game/Sprite/RegularAnimatedSprite.hpp
"
2
#include "
YAPOG/Graphics/Game/Sprite/DelayedFrameSwitcher.hpp
"
3
4
namespace
yap
5
{
6
const
int
RegularAnimatedSprite::DEFAULT_FRAME_RATE
= 10;
7
8
RegularAnimatedSprite::RegularAnimatedSprite
()
9
:
AnimatedSprite
()
10
{
11
SetFrameSwitcher
(
12
new
DelayedFrameSwitcher
(
13
Time
(1.0f / static_cast<float> (
DEFAULT_FRAME_RATE
))));
14
}
15
16
RegularAnimatedSprite::~RegularAnimatedSprite
()
17
{
18
}
19
20
RegularAnimatedSprite::RegularAnimatedSprite
(
21
const
RegularAnimatedSprite
& copy)
22
:
AnimatedSprite
(copy)
23
{
24
}
25
26
RegularAnimatedSprite
*
RegularAnimatedSprite::Clone
()
const
27
{
28
return
new
RegularAnimatedSprite
(*
this
);
29
}
30
31
RegularAnimatedSprite::RegularAnimatedSprite
(
const
Time
& delay)
32
:
AnimatedSprite
()
33
{
34
SetFrameSwitcher
(
new
DelayedFrameSwitcher
(delay));
35
}
36
37
RegularAnimatedSprite::RegularAnimatedSprite
(
int
frameRate)
38
:
AnimatedSprite
()
39
{
40
SetFrameSwitcher
(
41
new
DelayedFrameSwitcher
(
42
Time
(1.0f / static_cast<float> (frameRate))));
43
}
44
}
// namespace yap
YAPOG
src
YAPOG
Graphics
Game
Sprite
RegularAnimatedSprite.cpp
Generated on Mon Sep 17 2012 22:24:25 for YAPOG by
1.8.1.1