DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс HeartAttackMdfr
+ Граф наследования:HeartAttackMdfr:

Закрытые члены

override void Init ()
 
override bool ActivateCondition (PlayerBase player)
 
override void OnActivate (PlayerBase player)
 
override bool DeactivateCondition (PlayerBase player)
 
override void OnTick (PlayerBase player, float deltaT)
 

Закрытые данные

const float HEALTH_DECREMENT_PER_SEC = -0.2
 
const float SHOCK_DECREMENT_PER_SEC = -2
 
const float SHOCK_LIMIT = 0
 

Подробное описание

Методы

◆ ActivateCondition()

override bool ActivateCondition ( PlayerBase player)
inlineprivate
18 {
19 return false;
20 }

◆ DeactivateCondition()

override bool DeactivateCondition ( PlayerBase player)
inlineprivate
27 {
28 return false;
29 }

◆ Init()

override void Init ( )
inlineprivate
8 {
10 m_ID = eModifiers.MDF_HEART_ATTACK;
13 m_IsPersistent = true;
16 }
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
overall time this modifier was active
Definition ModifierBase.c:14
void DisableDeactivateCheck()
Definition ModifierBase.c:86
void DisableActivateCheck()
Definition ModifierBase.c:81
float m_TickIntervalActive
Definition ModifierBase.c:18
float m_TickIntervalInactive
Definition ModifierBase.c:17
bool m_IsPersistent
should this modifier track overall time it was active ?
Definition ModifierBase.c:15
const int DEFAULT_TICK_TIME_INACTIVE
Definition ModifiersManager.c:29
enum eModifierSyncIDs DEFAULT_TICK_TIME_ACTIVE
eModifiers
Definition eModifiers.c:2

Перекрестные ссылки DEFAULT_TICK_TIME_ACTIVE, DEFAULT_TICK_TIME_INACTIVE, DisableActivateCheck(), DisableDeactivateCheck(), m_ID, m_IsPersistent, m_TickIntervalActive, m_TickIntervalInactive и m_TrackActivatedTime.

◆ OnActivate()

override void OnActivate ( PlayerBase player)
inlineprivate
23 {
24 }

◆ OnTick()

override void OnTick ( PlayerBase player,
float deltaT )
inlineprivate
32 {
33 if ( player.GetHealth("GlobalHealth","Shock") <= SHOCK_LIMIT )
34 {
35 float currenthealth = player.GetHealth("GlobalHealth", "Health");
36 player.AddHealth("GlobalHealth", "Health" , HEALTH_DECREMENT_PER_SEC * deltaT );
37 }
38 else
39 {
40 float currentshock = player.GetHealth("GlobalHealth", "Shock");
41 player.AddHealth("GlobalHealth", "Shock", SHOCK_DECREMENT_PER_SEC * deltaT);
42 }
43 }
const float SHOCK_LIMIT
Definition HeartAttack.c:5
const float SHOCK_DECREMENT_PER_SEC
Definition HeartAttack.c:4
const float HEALTH_DECREMENT_PER_SEC
Definition HeartAttack.c:3
Definition EntityAI.c:95

Перекрестные ссылки HEALTH_DECREMENT_PER_SEC, SHOCK_DECREMENT_PER_SEC и SHOCK_LIMIT.

Поля

◆ HEALTH_DECREMENT_PER_SEC

const float HEALTH_DECREMENT_PER_SEC = -0.2
private

Используется в OnTick().

◆ SHOCK_DECREMENT_PER_SEC

const float SHOCK_DECREMENT_PER_SEC = -2
private

Используется в OnTick().

◆ SHOCK_LIMIT

const float SHOCK_LIMIT = 0
private

Используется в OnTick().


Объявления и описания членов класса находятся в файле: