Planeshift
|
Represents a stat for the NPC. More...
#include <stat.h>
Public Member Functions | |
float | GetMax () const |
Get the max stat value. | |
float | GetRate () const |
Get the regeneration rate. | |
float | GetValue () const |
Return the current value of the stat. | |
void | SetMax (float max) |
Set the maximum stat value. | |
void | SetRate (float rate, csTicks now) |
Set the regeneration value for this stat. | |
void | SetValue (float value, csTicks now) |
Set the stat value. | |
Stat () | |
Constructor. | |
void | Update (csTicks now) |
Update the stat to now. |
Represents a stat for the NPC.
Used to extrapolated stat values as they regenerate.
float Stat::GetRate | ( | ) | const [inline] |
float Stat::GetValue | ( | ) | const [inline] |
void Stat::SetMax | ( | float | max | ) |
Set the maximum stat value.
void Stat::SetRate | ( | float | rate, |
csTicks | now | ||
) |
Set the regeneration value for this stat.
void Stat::SetValue | ( | float | value, |
csTicks | now | ||
) |
Set the stat value.
void Stat::Update | ( | csTicks | now | ) |
Update the stat to now.