public void UpdateSimSystems(uint dt) { this.updatingSim = true; for (SimSystemBase simSystemBase = this.simSystems.Head; simSystemBase != null; simSystemBase = simSystemBase.Next) { simSystemBase.AccumulateDT(dt); if ((simSystemBase.SchedulingPattern & this.simThread) != 0) { simSystemBase.Update(); } } this.updatingSim = false; if (this.UpdateSimComplete != null) { this.UpdateSimComplete.Invoke(); } this.simThread = (ushort)((int)this.simThread << 1 | 1); }
public void RemoveSimSystem(SimSystemBase system) { this.simSystems.Remove(system); system.RemoveFromGame(this); }
public void AddSimSystem(SimSystemBase system, int priority, ushort schedulingPattern) { this.AddSystemToGame <SimSystemBase>(system, priority, schedulingPattern); this.simSystems.Add(system); }