5 [
Attribute(
"5",
desc:
"How long will the hint be active if it was valid in seconds")]
6 protected int m_DisplayTime;
8 protected SCR_NotificationsComponent m_NotificationsComponent;
9 protected vector m_vLocation = vector.Zero;
10 protected bool m_bShowLocation;
11 protected bool m_bIsListeningToDisable;
18 if (!m_NotificationsComponent)
20 m_NotificationsComponent = SCR_NotificationsComponent.GetInstance();
21 if (!m_NotificationsComponent)
26 m_NotificationsComponent.GetLastNotificationLocation(location);
27 if (location != m_vLocation)
29 m_vLocation = location;
30 m_bShowLocation =
true;
32 if (m_DisplayTime > 0)
34 if (m_bIsListeningToDisable)
35 GetGame().GetCallqueue().Remove(SetLocationDisabled);
37 m_bIsListeningToDisable =
true;
38 GetGame().GetCallqueue().CallLater(SetLocationDisabled, m_DisplayTime * 1000);
42 return GetReturnResult(m_vLocation != vector.Zero && m_bShowLocation);
45 protected void SetLocationDisabled()
47 m_bShowLocation =
false;
48 m_bIsListeningToDisable =
false;