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