3 private const float HEALTH_DECREMENT_PER_SEC = -0.2;
4 private const float SHOCK_DECREMENT_PER_SEC = -2;
5 private const float SHOCK_LIMIT = 0;
17 override bool ActivateCondition(
PlayerBase player)
26 override bool DeactivateCondition(
PlayerBase player)
31 override void OnTick(
PlayerBase player,
float deltaT)
33 if ( player.GetHealth(
"GlobalHealth",
"Shock") <= SHOCK_LIMIT )
35 float currenthealth = player.GetHealth(
"GlobalHealth",
"Health");
36 player.AddHealth(
"GlobalHealth",
"Health" , HEALTH_DECREMENT_PER_SEC * deltaT );
40 float currentshock = player.GetHealth(
"GlobalHealth",
"Shock");
41 player.AddHealth(
"GlobalHealth",
"Shock", SHOCK_DECREMENT_PER_SEC * deltaT);