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

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

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

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

const float HEALTHY_LEG = 100
 
int currentState = -1
 
const float TIME_TO_UPDATE = 0.5
 
float elapsedTime = TIME_TO_UPDATE + 1
 

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

Методы

◆ DeactivateCondition()

override bool DeactivateCondition ( PlayerBase player)
inlineprivate
51 {
52 if ( player.GetHealth("RightLeg", "Health") >= HEALTHY_LEG && player.GetHealth("LeftLeg", "Health") >= HEALTHY_LEG )
53 {
54
55 return true;
56 }
57 else
58 {
59 return false;
60 }
61 }
const float HEALTHY_LEG
Definition BrokenLegs.c:3
Definition EntityAI.c:95

Перекрестные ссылки HEALTHY_LEG.

◆ Init()

override void Init ( )
inlineprivate
13 {
16 m_ID = eModifiers.MDF_BROKEN_LEGS;
19 m_ActivationType = EActivationType.TRIGGER_EVENT_ON_ACTIVATION;
20 m_IsPersistent = true;
21 }
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
bool m_AnalyticsStatsEnabled
Definition ModifierBase.c:31
float m_TickIntervalActive
Definition ModifierBase.c:18
float m_TickIntervalInactive
Definition ModifierBase.c:17
EActivationType m_ActivationType
Definition ModifierBase.c:27
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
eModifiers
Definition eModifiers.c:2

Перекрестные ссылки DEFAULT_TICK_TIME_INACTIVE, m_ActivationType, m_AnalyticsStatsEnabled, m_ID, m_IsPersistent, m_TickIntervalActive, m_TickIntervalInactive и m_TrackActivatedTime.

◆ OnActivate()

override void OnActivate ( PlayerBase player)
inlineprivate
24 {
25 //Print("------------> OnActivate - BrokenLegsMdfr");
26 player.SetBrokenLegs(-eBrokenLegs.BROKEN_LEGS);//note the negative sign
27 player.GetNotifiersManager().ActivateByType(eNotifiers.NTF_FRACTURE);
28 }
eBrokenLegs
Definition EBrokenLegs.c:2
eNotifiers
Definition NotifiersManager.c:2

◆ OnDeactivate()

override void OnDeactivate ( PlayerBase player)
inlineprivate
39 {
40 player.UpdateBrokenLegs(eBrokenLegs.NO_BROKEN_LEGS);
41 if ( player.IsWearingSplint() )
42 {
43 MiscGameplayFunctions.RemoveSplint(player); //Remove splint when leg is healed
44 }
45
46 player.SetBrokenLegs(eBrokenLegs.NO_BROKEN_LEGS);
47 player.GetNotifiersManager().DeactivateByType(eNotifiers.NTF_FRACTURE);
48 }

◆ OnReconnect()

override void OnReconnect ( PlayerBase player)
inlineprivate
31 {
32 //Print("------------> OnReconnect - BrokenLegsMdfr");
33 player.SetBrokenLegs(player.GetBrokenLegs());
34 player.GetNotifiersManager().ActivateByType(eNotifiers.NTF_FRACTURE);
35 }

◆ OnTick()

override void OnTick ( PlayerBase player,
float deltaT )
inlineprivate
64 {
65 player.UpdateBrokenLegs(/*legacy param - value not used*/0);
66 }

Поля

◆ currentState

int currentState = -1
private

◆ elapsedTime

float elapsedTime = TIME_TO_UPDATE + 1
private

◆ HEALTHY_LEG

const float HEALTHY_LEG = 100
private

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

◆ TIME_TO_UPDATE

const float TIME_TO_UPDATE = 0.5
private

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