Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
HandleUpdateVONControllersSystem.c
Go to the documentation of this file.
2{
3 override static void InitInfo(WorldSystemInfo outInfo)
4 {
5 outInfo
6 .SetAbstract(false)
7 .AddPoint(ESystemPoint.Frame);
8 }
9
10 protected ref array<SCR_VONController> m_Components = {};
11
12 override protected void OnUpdatePoint(WorldUpdatePointArgs args)
13 {
14 float timeSlice = args.GetTimeSliceSeconds();
15
16 foreach (SCR_VONController comp: m_Components)
17 {
18 comp.Update(timeSlice);
19 }
20 }
21
22 override protected void OnDiag(float timeSlice)
23 {
24 DbgUI.Begin("HandleUpdateVONControllersSystem");
25
26 DbgUI.Text("Items: " + m_Components.Count());
27
28 if (DbgUI.Button("Dump active components"))
29 {
30 foreach (SCR_VONController comp: m_Components)
31 {
32 Print(comp.GetOwner(), LogLevel.ERROR);
33 }
34 }
35
36 DbgUI.End();
37 }
38
39 void Register(SCR_VONController component)
40 {
41 //About to be deleted
42 if (component.GetOwner().IsDeleted() || (component.GetOwner().GetFlags() & EntityFlags.USER5))
43 return;
44
45 if (m_Components.Find(component) != -1)
46 return;
47
48 m_Components.Insert(component);
49 }
50
51 void Unregister(SCR_VONController component)
52 {
53 int idx = m_Components.Find(component);
54 if (idx == -1)
55 return;
56
57 m_Components.Remove(idx);
58 }
59}
Definition DbgUI.c:66
void Register(SCR_VONController component)
void Unregister(SCR_VONController component)
void OnUpdatePoint(WorldUpdatePointArgs args)
Structure holding world system meta-information required by the engine.
Structure holding extra data of WorldSystem update point.
WorldSystemPoint ESystemPoint
Definition gameLib.c:7
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
EntityFlags
Various entity flags.
Definition EntityFlags.c:14