![]() |
Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Class that manages the statistics and achievements of a single player. More...
#include <Statistics.h>
Public Member Functions | |
StatValue | AddValue (const eStatistic a_Stat, const StatValue a_Delta=1) |
Increments the specified stat. More... | |
cStatManager () | |
StatValue | GetValue (const eStatistic a_Stat) const |
Return the value of the specified stat. More... | |
void | Reset () |
Reset everything. More... | |
void | SetValue (const eStatistic a_Stat, const StatValue a_Value) |
Set the value of the specified stat. More... | |
Private Attributes | |
StatValue | m_MainStats [statCount] |
Class that manages the statistics and achievements of a single player.
Definition at line 127 of file Statistics.h.
cStatManager::cStatManager | ( | ) |
Definition at line 141 of file Statistics.cpp.
StatValue cStatManager::AddValue | ( | const eStatistic | a_Stat, |
const StatValue | a_Delta = 1 |
||
) |
Increments the specified stat.
Returns the new value.
Definition at line 172 of file Statistics.cpp.
StatValue cStatManager::GetValue | ( | const eStatistic | a_Stat | ) | const |
Return the value of the specified stat.
Definition at line 150 of file Statistics.cpp.
void cStatManager::Reset | ( | void | ) |
Reset everything.
Definition at line 185 of file Statistics.cpp.
void cStatManager::SetValue | ( | const eStatistic | a_Stat, |
const StatValue | a_Value | ||
) |
Set the value of the specified stat.
Definition at line 161 of file Statistics.cpp.
Definition at line 154 of file Statistics.h.