public Level( string name, EntityContainer portals, EntityContainer <Obstacle> obstacles, Dictionary <char, Platform> platformDictionary, List <Customer> allCustomersInLevel, Player player, Vec2F playerStartingPosition ) { InitializeLevel(); Name = name; this.portals = portals; this.obstacles = obstacles; this.platformDictionary = platformDictionary; this.allCustomersInLevel = allCustomersInLevel; activeCustomersInlevel = new EntityContainer <Customer>(allCustomersInLevel.Count); customerSpawnEvents = new TimedEventContainer(allCustomersInLevel.Count); customerSpawnEvents.AttachEventBus(spaceTaxibus); GenerateCustomerSpawnEvents(); CustomerDespawnEvents = new TimedEventContainer(allCustomersInLevel.Count); CustomerDespawnEvents.AttachEventBus(spaceTaxibus); CurrentlyCarriedCustomer = null; this.player = player; this.playerStartingPosition = playerStartingPosition; }
public ContainerTest() { bus = new GameEventBus <object>(); bus.InitializeEventBus(new List <GameEventType>() { GameEventType.TimedEvent }); container = new TimedEventContainer(5); container.AttachEventBus(bus); processor = new MockupEventProcessor(); bus.Subscribe(GameEventType.TimedEvent, processor); }
public static void SetContainerSize(int size) { SpaceTaxiEventContainer.container = new TimedEventContainer(size); }
public static TimedEventContainer GetContainer() { return(SpaceTaxiEventContainer.container ?? ( SpaceTaxiEventContainer.container = new TimedEventContainer(1))); }