private void SpawnMainBuilding(CityData cityData) { int levelNumber = ServiceLocator.Instance.Get <IUserProfileModel>().OpenedBuildingId; LevelData levelData = cityData.GetLevelData(levelNumber); m_level.SpawnMainBuilding(levelData.Building.gameObject); }
public override void OnStateEnter(ProductionBuilding productionBuilding) { base.OnStateEnter(productionBuilding); m_targetBuilding.ProductionBuildingView.SetDrawingUIActive(true); string cityNumber = ServiceLocator.Instance.Get <IUserProfileModel>().CurrentCity; CityData cityData = ConfigManager.Instance.Get <CityConfig>().GetCityData(cityNumber); GraffitiData graffitiData = cityData.GetLevelData(m_targetBuilding.Id).GraffitiData; m_graffitiBlocksCount = graffitiData.blocksCount; }