Ejemplo n.º 1
0
        public void Load()
        {
            main = this;

            GameObjectFactory gameObjectFactory = GameObjectFactory.main;

            terrainHandlerObject = Instantiate(gameObjectFactory.prefabTerrain);
            TerrainHandler terrainHandler = terrainHandlerObject.GetComponent <TerrainHandler>();

            terrainHandler.Load();

            houseSmallClickerObject  = gameObjectFactory.houseSmallClickerObject;
            houseMediumClickerObject = gameObjectFactory.houseMediumClickerObject;
            houseLargeClickerObject  = gameObjectFactory.houseLargeClickerObject;
            foresterClickerObject    = gameObjectFactory.foresterClickerObject;
            quarryClickerObject      = gameObjectFactory.quarryClickerObject;
            cemeteryClickerObject    = gameObjectFactory.cemeteryClickerObject;
            farmClickerObject        = gameObjectFactory.farmClickerObject;
            clinicClickerObject      = gameObjectFactory.clinicClickerObject;
            tavernClickerObject      = gameObjectFactory.tavernClickerObject;
            villageDayPanelObject    = gameObjectFactory.villageDayPanelObject;
            mainMenuPanelObject      = gameObjectFactory.mainMenuPanelObject;
            resourceCostPanelObject  = gameObjectFactory.resourceCostPanelObject;
            unitActionPanelObject    = gameObjectFactory.unitActionPanelObject;

            resourceController = gameObject.GetComponent <ResourceController>();
            resourceController.Load(ref gameData);

            gridController = gameObject.GetComponent <GridController>();
            gridController.Load(ref gameData);

            dayNightController = gameObject.GetComponent <DayNightController>();
            dayNightController.Load(ref gameData);
        }
Ejemplo n.º 2
0
        public void StartDay()
        {
            dayNightController = PlayController.main.GetDayNightController();

            dayBar.minValue = dayNightController.GetTimerMinValue();
            dayBar.maxValue = dayNightController.GetTimerMaxValue();

            dayBar.value = dayBar.minValue;

            dayString = LocalisationService.GetTranslation(dayStringKey);

            dayStarted = true;
        }