Planeshift
Public Member Functions

Stat Class Reference

Represents a stat for the NPC. More...

#include <stat.h>

List of all members.

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.

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: