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