YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
HitPoint.cpp
Go to the documentation of this file.
1
#include "
YAPOG/Game/Pokemon/HitPoint.hpp
"
2
#include "
YAPOG/System/MathHelper.hpp
"
3
4
namespace
yap
5
{
6
const
UInt16
HitPoint::INITIAL_CURRENT_VALUE
= 0;
7
8
HitPoint::HitPoint
()
9
: currentValue_ (INITIAL_CURRENT_VALUE)
10
{
11
}
12
13
HitPoint::HitPoint
(
14
const
UInt16
& currentValue,
15
const
UInt16
& ev,
16
const
UInt16
& iv)
17
:
BaseStat
(ev, iv)
18
, currentValue_ (currentValue)
19
{
20
}
21
22
UInt16
HitPoint::GetCurrentValue
()
const
23
{
return
currentValue_
; }
24
25
void
HitPoint::SetCurrentValue
(
const
UInt16
& value)
26
{
27
currentValue_
=
MathHelper::Clamp
28
(value,
INITIAL_CURRENT_VALUE
,
value_
);
29
}
30
31
void
HitPoint::Restore
()
32
{
33
currentValue_
=
value_
;
34
}
35
36
}
// namespace yap
YAPOG
src
YAPOG
Game
Pokemon
HitPoint.cpp
Generated on Mon Sep 17 2012 22:24:24 for YAPOG by
1.8.1.1