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