Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
EffectManagerSystem.c
Go to the documentation of this file.
2 {
3  protected ref array<SCR_BaseEffectManagerComponent> m_Components = {};
4 
5  //------------------------------------------------------------------------------------------------
6  protected override void OnUpdate(ESystemPoint point)
7  {
8  float timeSlice = GetWorld().GetFixedTimeSlice();
9 
10  foreach (SCR_BaseEffectManagerComponent comp: m_Components)
11  {
12  comp.UpdateModules(timeSlice);
13  }
14  }
15 
16  //------------------------------------------------------------------------------------------------
17  override void OnDiag(float timeSlice)
18  {
19  DbgUI.Begin("EffectManagerSystem");
20 
21  DbgUI.Text("Components: " + m_Components.Count());
22 
23  if (DbgUI.Button("Dump active components"))
24  {
25  foreach (SCR_BaseEffectManagerComponent comp: m_Components)
26  {
27  Print(comp.GetOwner(), LogLevel.ERROR);
28  }
29  }
30 
31  DbgUI.End();
32  }
33 
34  //------------------------------------------------------------------------------------------------
36  void Register(SCR_BaseEffectManagerComponent 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_BaseEffectManagerComponent component)
50  {
51  int idx = m_Components.Find(component);
52  if (idx == -1)
53  return;
54 
55  m_Components.Remove(idx);
56  }
57 }
EffectManagerSystem
Definition: EffectManagerSystem.c:1
GameSystem
Definition: GameSystem.c:12
SCR_BaseEffectManagerComponent
Definition: SCR_BaseEffectManagerComponent.c:11