DayZ 1.24
Loading...
Searching...
No Matches
HungerNotfr.c
Go to the documentation of this file.
2{
3 protected const float DEC_TRESHOLD_LOW = 0;
4 protected const float DEC_TRESHOLD_MED = -0.35;
5 protected const float DEC_TRESHOLD_HIGH = -0.57;
6 protected const float INC_TRESHOLD_LOW = 0;
7 protected const float INC_TRESHOLD_MED = 0.35;
8 protected const float INC_TRESHOLD_HIGH = 0.57;
9
13
14 override int GetNotifierType()
15 {
16 return eNotifiers.NTF_HUNGRY;
17 }
18
19 override void DisplayTendency(float delta)
20 {
21 //PrintString("delta:"+delta.ToString());
23 //GetVirtualHud().SetStatus(eDisplayElements.DELM_TDCY_ENERGY,tendency);
24
25 //DSLevels level = DetermineLevel( GetObservedValue(), PlayerConstants.THRESHOLD_ENERGY_WARNING, PlayerConstants.THRESHOLD_ENERGY_CRITICAL, PlayerConstants.THRESHOLD_ENERGY_BLINKING, PlayerConstants.THRESHOLD_ENERGY_EXTRA );
26
27 EStatLevels energy_level = m_Player.GetStatLevelEnergy();
29
30 if (dis_elm)
31 {
32 dis_elm.SetTendency(tendency);
33 dis_elm.SetSeriousnessLevel(energy_level);
34
35 }
36
37 /*
38 Print("-----------------------------------------------------------");
39 Print("water:"+ typename.EnumToString(EStatLevels,m_Player.GetStatLevelWater()));
40 Print("energy:"+ typename.EnumToString(EStatLevels,m_Player.GetStatLevelEnergy()));
41 Print("health:"+ typename.EnumToString(EStatLevels,m_Player.GetStatLevelHealth()));
42 Print("blood:"+ typename.EnumToString(EStatLevels,m_Player.GetStatLevelBlood()));
43 */
44 }
45
46 override void DisplayBadge()
47 {
48
49 }
50
51 override void HideBadge()
52 {
53 }
54
55
56 override float GetObservedValue()
57 {
58 return m_Player.GetStatEnergy().Get();
59 }
60};
DisplayElementBase GetElement(eDisplayElements element_id)
EStatLevels
Definition EStatLevels.c:2
void NotifiersManager(PlayerBase player)
eNotifiers
const float INC_TRESHOLD_MED
Definition HungerNotfr.c:7
void HungerNotfr(NotifiersManager manager)
Definition HungerNotfr.c:10
override void HideBadge()
Definition HungerNotfr.c:51
const float DEC_TRESHOLD_MED
Definition HungerNotfr.c:4
override void DisplayTendency(float delta)
Definition HungerNotfr.c:19
override int GetNotifierType()
Definition HungerNotfr.c:14
override void DisplayBadge()
Definition HungerNotfr.c:46
const float DEC_TRESHOLD_LOW
Definition HungerNotfr.c:3
override float GetObservedValue()
Definition HungerNotfr.c:56
const float DEC_TRESHOLD_HIGH
Definition HungerNotfr.c:5
const float INC_TRESHOLD_LOW
Definition HungerNotfr.c:6
const float INC_TRESHOLD_HIGH
Definition HungerNotfr.c:8
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)