3 static const int AGENT_THRESHOLD_ACTIVATE = 1;
4 static const int AGENT_THRESHOLD_DEACTIVATE = 100;
6 static const int EVENT_1_INTERVAL_MIN = 20;
7 static const int EVENT_1_INTERVAL_MAX = 40;
9 protected float m_NextEvent;
10 protected float m_Time;
20 override string GetDebugText()
22 return (
"Activate threshold: "+AGENT_THRESHOLD_ACTIVATE +
"| " +
"Deativate threshold: "+AGENT_THRESHOLD_DEACTIVATE);
25 override protected bool ActivateCondition(
PlayerBase player)
27 return ( player.GetSingleAgentCount(
eAgents.CHEMICAL_POISON) >= AGENT_THRESHOLD_ACTIVATE && player.GetSingleAgentCount(
eAgents.CHEMICAL_POISON) < AGENT_THRESHOLD_DEACTIVATE );
30 override protected void OnActivate(
PlayerBase player)
33 m_NextEvent =
Math.RandomFloatInclusive( EVENT_1_INTERVAL_MIN, EVENT_1_INTERVAL_MAX );
36 override protected void OnDeactivate(
PlayerBase player)
41 override protected bool DeactivateCondition(
PlayerBase player)
43 return !ActivateCondition(player);
46 override protected void OnTick(
PlayerBase player,
float deltaT)