Exemplo n.º 1
0
        //[SerializeField] private MapRenderer _MapRenderer	= default;


        private void Awake()
        {
            // Stop menu music
            MusicPlayer.StopMusic();

            // Load mission
            MissionRoot mission = LoadMission(SceneParameters.MissionPath);

            if (mission == null)
            {
                InfoPopup.Create("Failed to load mission.", OnLoadFailed);
                return;
            }

            // Load map
            Map map = LoadMap(mission);

            if (mission == null)
            {
                InfoPopup.Create("Failed to load map.", OnLoadFailed);
                return;
            }

            // Load game state
            string error;

            if (!GameState.Initialize(mission, SceneParameters.RandomSeed, out error))
            {
                InfoPopup.Create(error, OnLoadFailed);
                return;
            }

            // Setup Game
            //SetDaylightEverywhere(tethysGame.daylightEverywhere);
            //SetDaylightMoves(tethysGame.daylightMoves);
            //SetInitialLightLevel(tethysGame.initialLightLevel);

            // Initialize map
            //_MapRenderer.Initialize(mission, map, OnLoadMapComplete);
        }