34 private int m_LastPolledIndex = 0;
42 m_LastPolledIndex = 0;
64 void RegisterItself(
int notifier_id, NotifierBase modifier)
73 m_NotifierIDs.Insert(notifier_id);
74 #ifdef DIAG_NOTIFIER_LOGS
90 NotifierBase FindNotifier(
int type)
95 void ActivateByType(
int notifier,
bool triggerEvent =
true)
97 FindNotifier(notifier).SetActive(
true);
100 void DeactivateByType(
int notifier,
bool triggerEvent =
true)
102 FindNotifier(notifier).SetActive(
false);
116 #ifdef DIAG_NOTIFIER_LOGS
117 if (notifierCount == 0)
125 if (m_LastPolledIndex >= notifierCount)
127 #ifdef DIAG_NOTIFIER_LOGS
128 ErrorEx(
string.Format(
"Last poll index is %1 and notifiers count is %2. Restet poll index!", m_LastPolledIndex, notifierCount),
ErrorExSeverity.INFO);
130 m_LastPolledIndex = 0;
133 int notifierID = m_NotifierIDs[m_LastPolledIndex];
134 #ifdef DIAG_NOTIFIER_LOGS
135 ErrorEx(
string.Format(
"Got notifier ID %1 for poll index %2.", notifierID, m_LastPolledIndex),
ErrorExSeverity.INFO);
139 if (currentNotifier && currentNotifier.IsActive())
141 #ifdef DIAG_NOTIFIER_LOGS
144 int currentTime =
g_Game.GetTime();
147 if (currentNotifier.IsTimeToTick(currentTime))
149 #ifdef DIAG_NOTIFIER_LOGS
152 currentNotifier.OnTick(currentTime);
154 #ifdef DIAG_NOTIFIER_LOGS
161 #ifdef DIAG_NOTIFIER_LOGS
164 if (!currentNotifier)
167 ErrorEx(
string.Format(
"Could get notifier %1 with ID %2 but notifier is inactive!", currentNotifier, notifierID),
ErrorExSeverity.INFO);
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
void VirtualHud(PlayerBase player)
const int MIN_TICK_NOTIFIERS
string m_System
the manager instance
ref VirtualHud m_VirtualHud
enum eNotifiers MAX_COUNT
NotifierBase m_NotifiersStatic[MAX_COUNT]
ref array< ref NotifierBase > m_Notifiers