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