Planeshift
Stat Class Reference

Represents a stat for the NPC. More...

#include <stat.h>

Public Member Functions

float GetMax () const
 Get the max stat value. More...
 
float GetRate () const
 Get the regeneration rate. More...
 
float GetValue () const
 Return the current value of the stat. More...
 
void SetMax (float max)
 Set the maximum stat value. More...
 
void SetRate (float rate, csTicks now)
 Set the regeneration value for this stat. More...
 
void SetValue (float value, csTicks now)
 Set the stat value. More...
 
 Stat ()
 Constructor. More...
 
void Update (csTicks now)
 Update the stat to now. More...
 

Detailed Description

Represents a stat for the NPC.

Used to extrapolated stat values as they regenerate.

Definition at line 29 of file stat.h.

Constructor & Destructor Documentation

Stat::Stat ( )
inline

Constructor.

Definition at line 35 of file stat.h.

Member Function Documentation

float Stat::GetMax ( ) const
inline

Get the max stat value.

Definition at line 70 of file stat.h.

float Stat::GetRate ( ) const
inline

Get the regeneration rate.

Definition at line 78 of file stat.h.

float Stat::GetValue ( ) const
inline

Return the current value of the stat.

Call Update before to get the extrapolated value.

Definition at line 62 of file stat.h.

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.


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