private void InitializeCustomers() { SpaceTaxiEventContainer.SetContainerSize(Customers.Count * 2 + 1); SpaceTaxiEventContainer.GetContainer().ResetContainer(); SpaceTaxiEventContainer.GetContainer().AttachEventBus(SpaceTaxiBus.GetBus()); var container = SpaceTaxiEventContainer.GetContainer(); foreach (Customer c in Customers) { container.AddTimedEvent(TimeSpanType.Seconds, c.SpawnTimer, "SPAWN_CUSTOMER", "", ""); container.AddTimedEvent(TimeSpanType.Seconds, c.DesapwnTimer, "DESPAWN_CUSTOMER", "", ""); } }
public void UpdateLevel() { Player.Move(); UpdateCustomer(); CheckPlatformCollision(); CheckObstacleCollision(); CheckExitCollision(); if (oldCustomer != null) { oldCustomer.Update(); if (oldCustomer.ToBeDeleted && oldCustomer.DestinationReached) { oldCustomer.DestinationReached = false; SpaceTaxiEventContainer.GetContainer().AddTimedEvent( TimeSpanType.Seconds, 2, "DELETE_OLD_CUSTOMER", "", ""); } } }
public void UpdateGameLogic() { SpaceTaxiEventContainer.GetContainer().ProcessTimedEvents(); LevelContainer.GetInstance().ActiveLevel.UpdateLevel(); }