public void RemoveBus(Bus b) { Buses.Remove(b); foreach (Module m in b.ConnectedModules) { m.BusConnections.Remove(b); } }
public void TimeTick() { List <Bus> buses = new List <Bus>(Buses); foreach (var bus in buses) { bus.TimeTick(); if (bus.Disappeared) { Buses.Remove(bus); } } foreach (var busstop in BusStops) { busstop.TimeTick(); } }