Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_DeployableSpawnPointSystem.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.FixedFrame);
8 }
9
10 protected ref array<SCR_BaseDeployableSpawnPointComponent> m_aComponents = {};
11
12 //------------------------------------------------------------------------------------------------
13 override protected void OnUpdatePoint(WorldUpdatePointArgs args)
14 {
15 float timeSlice = args.GetTimeSliceSeconds();
16
17 foreach (SCR_BaseDeployableSpawnPointComponent comp: m_aComponents)
18 {
19 comp.Update(timeSlice);
20 }
21 }
22
23 override void OnDiag(float timeSlice)
24 {
25 DbgUI.Begin("SCR_DeployableSpawnPointSystem");
26
27 DbgUI.Text("Comps: " + m_aComponents.Count());
28
29 if (DbgUI.Button("Dump active components"))
30 {
31 foreach (SCR_BaseDeployableSpawnPointComponent comp: m_aComponents)
32 {
33 Print(comp.GetOwner(), LogLevel.ERROR);
34 }
35 }
36
37 DbgUI.End();
38 }
39
40 void Register(SCR_BaseDeployableSpawnPointComponent component)
41 {
42 //About to be deleted
43 if (component.GetOwner().IsDeleted() || (component.GetOwner().GetFlags() & EntityFlags.USER5))
44 return;
45
46 if (m_aComponents.Contains(component))
47 return;
48
49 m_aComponents.Insert(component);
50 }
51
52 void Unregister(SCR_BaseDeployableSpawnPointComponent component)
53 {
54 m_aComponents.RemoveItem(component);
55 }
56}
Definition DbgUI.c:66
void OnUpdatePoint(WorldUpdatePointArgs args)
ref array< SCR_BaseDeployableSpawnPointComponent > m_aComponents
void Register(SCR_BaseDeployableSpawnPointComponent component)
void Unregister(SCR_BaseDeployableSpawnPointComponent 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
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