Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Private Attributes | List of all members
cStatManager Class Reference

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]
 

Detailed Description

Class that manages the statistics and achievements of a single player.

Definition at line 127 of file Statistics.h.

Constructor & Destructor Documentation

cStatManager::cStatManager ( )

Definition at line 141 of file Statistics.cpp.

Member Function Documentation

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.

Member Data Documentation

StatValue cStatManager::m_MainStats[statCount]
private

Definition at line 154 of file Statistics.h.


The documentation for this class was generated from the following files: