コード例 #1
0
ファイル: LoadWorldMenu.cs プロジェクト: tarsupin/Nexus
        // Close the menu and attempt to load the designated world.
        public void LoadWorldAttempt()
        {
            UIHandler.SetMenu(null, false);
            string worldID = this.worldIdInput.text.ToUpper();

            SceneTransition.ToWorld(worldID);
        }
コード例 #2
0
        // Download a World
        private static async Task <bool> DownloadWorld(string worldId)
        {
            bool success = await WebHandler.WorldRequest(worldId);

            if (success)
            {
                SceneTransition.ToWorld(worldId, true);
            }
            return(true);
        }
コード例 #3
0
        public virtual void EndLevel()
        {
            // If there is an active world, return to the world stage.
            if (Systems.handler.campaignState.worldId.Length > 0)
            {
                SceneTransition.ToWorld(Systems.handler.campaignState.worldId);
                return;
            }

            // Otherwise, go to the planet selection scene:
            SceneTransition.ToPlanetSelection();
        }
コード例 #4
0
ファイル: WorldConsole.cs プロジェクト: tarsupin/Nexus
        public static void WorldChange()
        {
            string currentIns = ConsoleTrack.GetArgAsString();

            ConsoleTrack.possibleTabs = "Example: `load-world worldIdHere`";
            ConsoleTrack.helpText     = "This will load a world (if it exists). Enter the world ID of the world to load.";

            if (ConsoleTrack.activate && currentIns.Length > 0)
            {
                SceneTransition.ToWorld(currentIns);
            }
        }
コード例 #5
0
        private void LoadWorldById(string worldID)
        {
            // Load the Special "Users World" menu.
            if (worldID == "_users")
            {
                UIHandler.SetMenu(UIHandler.loadWorldMenu, false);
                return;
            }

            SceneTransition.ToWorld(worldID);
            return;
        }
コード例 #6
0
        public override void ActivateWorldFuncButton()
        {
            WEScene scene = (WEScene)Systems.scene;

            Systems.handler.worldContent.SaveWorld();
            GameValues.LastAction = "WEPlayButton";

            if (scene.tutorial.tutorialStep == TutorialWorldEdit.finalStep)
            {
                UIHandler.AddNotification(UIAlertType.Warning, "Playtest Fixes", "If something goes wrong, don't worry. Return to map editing or reset your position through the tilde (~) console.", 1500);
            }

            SceneTransition.ToWorld(scene.worldContent.worldId);
        }