DayZ 1.24
Loading...
Searching...
No Matches
HealthNotfr Class Reference
Inheritance diagram for HealthNotfr:
[legend]
Collaboration diagram for HealthNotfr:
[legend]

Protected Member Functions

float GetObservedValue ()
 

Private Member Functions

void HealthNotfr (NotifiersManager manager)
 
override int GetNotifierType ()
 
override void DisplayBadge ()
 
override void DisplayTendency (float delta)
 
override void HideBadge ()
 
- Private Member Functions inherited from NotifierBase
int CalculateTendency (float delta, float inctresholdlow, float inctresholdmed, float inctresholdhigh, float dectresholdlow, float dectresholdmed, float dectresholdhigh)
 
eBadgeLevel DetermineBadgeLevel (float value, float lvl_1, float lvl_2, float lvl_3)
 
void DisplayBadge ()
 
void HideBadge ()
 
float GetObservedValue ()
 

Private Attributes

const float DEC_TRESHOLD_LOW = 0
 
const float DEC_TRESHOLD_MED = -0.7
 
const float DEC_TRESHOLD_HIGH = -1.3
 
const float INC_TRESHOLD_LOW = 0
 
const float INC_TRESHOLD_MED = 0.7
 
const float INC_TRESHOLD_HIGH = 1.3
 

Detailed Description

Definition at line 1 of file HealthNotfr.c.

Constructor & Destructor Documentation

◆ HealthNotfr()

void HealthNotfr::HealthNotfr ( NotifiersManager manager)
inlineprivate

Definition at line 18 of file HealthNotfr.c.

19 {
20 m_TickInterval = 3000;
22 }
int m_TendencyBufferSize
Definition NotifierBase.c:9

References NotifierBase::m_TendencyBufferSize, and NotifierBase::m_TickInterval.

Member Function Documentation

◆ DisplayBadge()

override void HealthNotfr::DisplayBadge ( )
inlineprivate

Definition at line 29 of file HealthNotfr.c.

30 {
31 }

◆ DisplayTendency()

override void HealthNotfr::DisplayTendency ( float delta)
inlineprivate

Definition at line 33 of file HealthNotfr.c.

34 {
36 //PrintString("tendency:" + tendency);
37 //GetVirtualHud().SetStatus(eDisplayElements.DELM_TDCY_HEALTH,tendency);
38
39 //DSLevels level = DetermineLevel( GetObservedValue(), PlayerConstants.THRESHOLD_HEALTH_WARNING, PlayerConstants.THRESHOLD_HEALTH_CRITICAL, PlayerConstants.THRESHOLD_HEALTH_BLINKING, PlayerConstants.THRESHOLD_HEALTH_EXTRA);
40
41 EStatLevels health_level = m_Player.GetStatLevelHealth();
43
44 if (dis_elm)
45 {
46 dis_elm.SetSeriousnessLevel(health_level);
47 dis_elm.SetTendency(tendency);
48 }
49 }
DisplayElementBase GetElement(eDisplayElements element_id)
EStatLevels
Definition EStatLevels.c:2
const float DEC_TRESHOLD_HIGH
Definition HealthNotfr.c:12
const float INC_TRESHOLD_LOW
Definition HealthNotfr.c:13
const float DEC_TRESHOLD_MED
Definition HealthNotfr.c:11
const float INC_TRESHOLD_HIGH
Definition HealthNotfr.c:15
const float INC_TRESHOLD_MED
Definition HealthNotfr.c:14
const float DEC_TRESHOLD_LOW
Definition HealthNotfr.c:10
PlayerBase m_Player
Definition NotifierBase.c:6
VirtualHud GetVirtualHud()
int CalculateTendency(float delta, float inctresholdlow, float inctresholdmed, float inctresholdhigh, float dectresholdlow, float dectresholdmed, float dectresholdhigh)

References NotifierBase::CalculateTendency(), DEC_TRESHOLD_HIGH, DEC_TRESHOLD_LOW, DEC_TRESHOLD_MED, GetElement(), NotifierBase::GetVirtualHud(), INC_TRESHOLD_HIGH, INC_TRESHOLD_LOW, INC_TRESHOLD_MED, and NotifierBase::m_Player.

◆ GetNotifierType()

override int HealthNotfr::GetNotifierType ( )
inlineprivate

Definition at line 24 of file HealthNotfr.c.

25 {
26 return eNotifiers.NTF_HEALTHY;
27 }
eNotifiers

◆ GetObservedValue()

float HealthNotfr::GetObservedValue ( )
inlineprotected

Definition at line 57 of file HealthNotfr.c.

58 {
59 float health = m_Player.GetHealth("", "Health");
60 //PrintString("health:" + health);
61 return health;
62 }

References NotifierBase::m_Player.

◆ HideBadge()

override void HealthNotfr::HideBadge ( )
inlineprivate

Definition at line 51 of file HealthNotfr.c.

52 {
53
55 }

Member Data Documentation

◆ DEC_TRESHOLD_HIGH

const float HealthNotfr::DEC_TRESHOLD_HIGH = -1.3
private

Definition at line 12 of file HealthNotfr.c.

Referenced by DisplayTendency().

◆ DEC_TRESHOLD_LOW

const float HealthNotfr::DEC_TRESHOLD_LOW = 0
private

Definition at line 10 of file HealthNotfr.c.

Referenced by DisplayTendency().

◆ DEC_TRESHOLD_MED

const float HealthNotfr::DEC_TRESHOLD_MED = -0.7
private

Definition at line 11 of file HealthNotfr.c.

Referenced by DisplayTendency().

◆ INC_TRESHOLD_HIGH

const float HealthNotfr::INC_TRESHOLD_HIGH = 1.3
private

Definition at line 15 of file HealthNotfr.c.

Referenced by DisplayTendency().

◆ INC_TRESHOLD_LOW

const float HealthNotfr::INC_TRESHOLD_LOW = 0
private

Definition at line 13 of file HealthNotfr.c.

Referenced by DisplayTendency().

◆ INC_TRESHOLD_MED

const float HealthNotfr::INC_TRESHOLD_MED = 0.7
private

Definition at line 14 of file HealthNotfr.c.

Referenced by DisplayTendency().


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