Esempio n. 1
0
        private void DoOfflineSimulationForGenerators()
        {
            Map map = Service.CurrentPlayer.Map;
            StaticDataController staticDataController = Service.StaticDataController;
            ICurrencyController  iCurrencyController  = Service.ICurrencyController;
            ISupportController   iSupportController   = Service.ISupportController;

            foreach (Building current in map.Buildings)
            {
                BuildingTypeVO buildingTypeVO = staticDataController.Get <BuildingTypeVO>(current.Uid);
                if (buildingTypeVO.Type == BuildingType.Resource && iSupportController.FindCurrentContract(current.Key) == null)
                {
                    current.AccruedCurrency = iCurrencyController.CalculateAccruedCurrency(current, buildingTypeVO);
                }
            }
        }
Esempio n. 2
0
        private void DoOfflineSimulationForGenerators()
        {
            Map                 map                = Service.Get <CurrentPlayer>().Map;
            IDataController     dataController     = Service.Get <IDataController>();
            ICurrencyController currencyController = Service.Get <ICurrencyController>();
            ISupportController  supportController  = Service.Get <ISupportController>();

            foreach (Building current in map.Buildings)
            {
                BuildingTypeVO buildingTypeVO = dataController.Get <BuildingTypeVO>(current.Uid);
                if (buildingTypeVO.Type == BuildingType.Resource && supportController.FindCurrentContract(current.Key) == null)
                {
                    current.AccruedCurrency = currencyController.CalculateAccruedCurrency(current, buildingTypeVO);
                }
            }
        }