3 protected ref array<SCR_VONController> m_Components = {};
5 override protected void OnUpdate(ESystemPoint point)
7 float timeSlice = GetWorld().GetTimeSlice();
9 foreach (SCR_VONController comp: m_Components)
11 comp.Update(timeSlice);
15 override protected void OnDiag(
float timeSlice)
17 DbgUI.Begin(
"HandleUpdateVONControllersSystem");
19 DbgUI.Text(
"Items: " + m_Components.Count());
21 if (DbgUI.Button(
"Dump active components"))
23 foreach (SCR_VONController comp: m_Components)
25 Print(comp.GetOwner(), LogLevel.ERROR);
32 void Register(SCR_VONController component)
35 if (component.GetOwner().IsDeleted() || (component.GetOwner().GetFlags() & EntityFlags.USER5))
38 if (m_Components.Find(component) != -1)
41 m_Components.Insert(component);
44 void Unregister(SCR_VONController component)
46 int idx = m_Components.Find(component);
50 m_Components.Remove(idx);