Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_MapMarkerManagerSystem.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
3 {
4  protected ref array<SCR_MapMarkerManagerComponent> m_Components = {};
5 
6  //------------------------------------------------------------------------------------------------
7  override protected void OnUpdate(ESystemPoint point)
8  {
9  float timeSlice = GetWorld().GetTimeSlice();
10 
11  foreach (SCR_MapMarkerManagerComponent comp: m_Components)
12  {
13  comp.Update(timeSlice);
14  }
15  }
16 
17  //------------------------------------------------------------------------------------------------
18  override protected void OnDiag(float timeSlice)
19  {
20  DbgUI.Begin("SCR_MapMarkerManagerSystem");
21 
22  DbgUI.Text("Items: " + m_Components.Count());
23 
24  if (DbgUI.Button("Dump active components"))
25  {
26  foreach (SCR_MapMarkerManagerComponent comp: m_Components)
27  {
28  Print(comp.GetOwner(), LogLevel.ERROR);
29  }
30  }
31 
32  DbgUI.End();
33  }
34 
35  //------------------------------------------------------------------------------------------------
36  void Register(SCR_MapMarkerManagerComponent component)
37  {
38  //About to be deleted
39  if (component.GetOwner().IsDeleted() || (component.GetOwner().GetFlags() & EntityFlags.USER5))
40  return;
41 
42  if (m_Components.Find(component) != -1)
43  return;
44 
45  m_Components.Insert(component);
46  }
47 
48  //------------------------------------------------------------------------------------------------
49  void Unregister(SCR_MapMarkerManagerComponent component)
50  {
51  int idx = m_Components.Find(component);
52  if (idx == -1)
53  return;
54 
55  m_Components.Remove(idx);
56  }
57 }
SCR_MapMarkerManagerSystem
Definition: SCR_MapMarkerManagerSystem.c:2
GameSystem
Definition: GameSystem.c:12