Beispiel #1
0
        public void Initialize()
        {
            GameObjectsManager.Initialize();
            ImageManager.Initialize();
            TimeManager.Initialize();

            SaveLoadService = new SaveLoadService();
            SaveLoadService.Initialize();

            ConfigurationService = new ConfigurationService();
            ConfigurationService.Initialize();
            BuyPriceDictionaryService = new BuyPriceDictionaryService();
            BuyPriceDictionaryService.Initialize();
            SellPriceDictionaryService = new SellPriceDictionaryService();
            SellPriceDictionaryService.Initialize();
            // before trade need to know a price
            TradeService = new TradeService();
            TradeService.Initialize();
            MoneyService = new MoneyService();
            MoneyService.Initialize();
            ProducerProductionDictionaryService = new ProducerProductionDictionaryService();
            ProducerProductionDictionaryService.Initialize();
            //
            ProductionDurationDictionaryService = new ProductionDurationDictionaryService();
            ProductionDurationDictionaryService.Initialize();
            SatietyDurationDictionaryService = new SatietyDurationDictionaryService();
            SatietyDurationDictionaryService.Initialize();
            // before visualize money amount need to know a money amount
            InventoryService = new InventoryService();
            InventoryService.Initialize();
            // before visualize inventory items amount need to know a inventory items amount
            UserInterfaceManager.Initialize();
        }
Beispiel #2
0
 public void Uninitialize()
 {
     UserInterfaceManager.Uninitialize();
     GameObjectsManager.Uninitialize();
     GameFlowManager.Uninitialize();
     CountdownManager.Uninitialize();
     BrickMovementManager.Uninitialize();
     BrickHealthManager.Uninitialize();
     BrickColorManager.Uninitialize();
     ScoreManager.Uninitialize();
 }
        public void Initialize()
        {
            GameObjectsManager = Instantiate(_gameObjectsManagerPrefab, this.gameObject.transform);
            GameObjectsManager.Initialize();
            UserInterfaceManager = Instantiate(_userInterfaceManagerPrefab, this.gameObject.transform);
            BuildingsManager     = Instantiate(_buildingsManagerPrefab, this.gameObject.transform);
            BuildingsManager.Initialize("Buildings");
            HumansManager = Instantiate(_humansManagerPrefab, this.gameObject.transform);
            HumansManager.Initialize("Humans");

            BuildingsFactory = new BuildingsFactory();
            BuildingsFactory.Initialize();
            HumansFactory = new HumansFactory();
            HumansFactory.Initialize();

            CityBuildingService = new CityBuildingService();
            // user interface need spawned buildings from city building service
            UserInterfaceManager.Initialize();
            CityBuildingService.Initialize(); // start point
        }