OpenMW
|
#include <stat.hpp>
Public Types | |
typedef T | Type |
Public Member Functions | |
DynamicStat () | |
DynamicStat (T base) | |
DynamicStat (T base, T modified, T current) | |
DynamicStat (const Stat< T > &stat, T current) | |
const T & | getBase () const |
T | getModified () const |
const T & | getCurrent () const |
void | set (const T &value) |
Set base, modified and current to value. | |
void | setBase (const T &value) |
Set base and adjust modified accordingly. | |
void | setModified (T value, const T &min, const T &max=std::numeric_limits< T >::max()) |
Set modified value an adjust base accordingly. | |
void | modify (const T &diff) |
Change modified relatively. | |
void | setCurrent (const T &value, bool allowDecreaseBelowZero=false) |
void | setModifier (const T &modifier) |
Private Attributes | |
Stat< T > | mStatic |
T | mCurrent |
typedef T MWMechanics::DynamicStat< T >::Type |
MWMechanics::DynamicStat< T >::DynamicStat | ( | ) | [inline] |
MWMechanics::DynamicStat< T >::DynamicStat | ( | T | base | ) | [inline] |
MWMechanics::DynamicStat< T >::DynamicStat | ( | T | base, |
T | modified, | ||
T | current | ||
) | [inline] |
MWMechanics::DynamicStat< T >::DynamicStat | ( | const Stat< T > & | stat, |
T | current | ||
) | [inline] |
const T& MWMechanics::DynamicStat< T >::getBase | ( | ) | const [inline] |
const T& MWMechanics::DynamicStat< T >::getCurrent | ( | ) | const [inline] |
T MWMechanics::DynamicStat< T >::getModified | ( | ) | const [inline] |
void MWMechanics::DynamicStat< T >::modify | ( | const T & | diff | ) | [inline] |
Change modified relatively.
void MWMechanics::DynamicStat< T >::set | ( | const T & | value | ) | [inline] |
Set base, modified and current to value.
void MWMechanics::DynamicStat< T >::setBase | ( | const T & | value | ) | [inline] |
Set base and adjust modified accordingly.
void MWMechanics::DynamicStat< T >::setCurrent | ( | const T & | value, |
bool | allowDecreaseBelowZero = false |
||
) | [inline] |
void MWMechanics::DynamicStat< T >::setModified | ( | T | value, |
const T & | min, | ||
const T & | max = std::numeric_limits<T>::max() |
||
) | [inline] |
Set modified value an adjust base accordingly.
void MWMechanics::DynamicStat< T >::setModifier | ( | const T & | modifier | ) | [inline] |
T MWMechanics::DynamicStat< T >::mCurrent [private] |
Stat<T> MWMechanics::DynamicStat< T >::mStatic [private] |