コード例 #1
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();
        }
コード例 #2
0
        public MainMenu()
        {
            this.textBox = new TextBox(null, (short)(Systems.screen.viewHalfWidth - 150 - 16), (short)(Systems.screen.viewHalfHeight - 150 - 16), 316, 378);

            short centerX = (short)(Systems.screen.viewHalfWidth - 28);
            short centerY = (short)(Systems.screen.viewHalfHeight - 28 + 40);

            this.menuTextPos = (short)(Systems.screen.viewHalfWidth - Systems.fonts.baseText.font.MeasureString(MainMenu.menuText).X * 0.5f);

            //this.goBack = new UICreoTextIcon(null, "Back", "Return", centerX, centerY, delegate () { UIHandler.SetMenu(null, false); } );

            this.log = new UICreoTextIcon(null, "Login", "Login", (short)(centerX - 66 - 50), centerY, delegate() {
                UIHandler.SetMenu(UIHandler.loginMenu, true);
                UIHandler.loginMenu.ShowMenu();
            });

            this.controls = new UICreoTextIcon(null, "Gamepad", "Controls", (short)(centerX - 66 - 50), (short)(centerY - 66 - 50), delegate() {
                UIHandler.SetMenu(UIHandler.controlMenu, true);
            });

            this.worlds   = new UICreoTextIcon(null, "MyWorld", "Worlds", centerX, (short)(centerY - 66 - 50), delegate() { SceneTransition.ToPlanetSelection(); });
            this.myLevels = new UICreoTextIcon(null, "MyLevels", "My Levels", (short)(centerX + 66 + 50), centerY, delegate() { SceneTransition.ToMyLevels(); });

            //this.TOP_RIGHT = new UICreoTextIcon(null, "MyWorld", "My World", (short)(centerX + 66 + 50), (short)(centerY - 66 - 50), delegate () { SceneTransition.ToWorldEditor("__WORLD"); } );

            this.myWorld = new UICreoTextIcon(null, "MyWorld", "My World", centerX, (short)(centerY + 66 + 50), delegate() { SceneTransition.ToWorldEditor("__WORLD"); });
        }