Esempio n. 1
0
 public static void NewGame()
 {
     SaveFile.CreateSaveFile();
     NoMode();
     Mainmenu    = true;
     Levelselect = true;
     MainMenu.LevelSelectOn();
 }
Esempio n. 2
0
 public static void EditingOn()
 {
     NoMode();
     Mainmenu    = true;
     Levelselect = true;
     Editing     = true;
     MainMenu.LevelSelectOn();
 }
Esempio n. 3
0
 public static void LoadingCustomOn()
 {
     NoMode();
     Mainmenu    = true;
     Levelselect = true;
     Custom      = true;
     MainMenu.LevelSelectOn();
 }
Esempio n. 4
0
        public static void NextScreen()
        {
            if (InputManager.Mousestate[1].LeftButton != Microsoft.Xna.Framework.Input.ButtonState.Pressed)
            {
                int i;
                if (!LevelSelect_Nav())
                {
                    for (i = 0; i < Button.ButtonList.Count; i++)
                    {
                        if (Button.ButtonList[i].Active && MouseClick.Rect.Intersects(Button.ButtonList[i].Rect))
                        {
                            switch (Button.ButtonList[i].Text.Text)
                            {
                            case "New Game":
                                ScreenManager.NewGame();
                                return;

                            case "Continue":
                                ScreenManager.NoMode();
                                ScreenManager.Mainmenu    = true;
                                ScreenManager.Levelselect = true;
                                MainMenu.LevelSelectOn();
                                return;

                            case "Stats":
                                ScreenManager.StatsOn();
                                return;

                            case "Erase Save Data":
                                MainMethod.popupBox = new PopupBox(new string[] {
                                    "Really delete all saved data?",
                                    "This will bring you back to level 1",
                                    "All of your custom levels will NOT be deleted"
                                }, PopupType.START_NEW_GAME);
                                return;

                            case "Play Custom":
                                ScreenManager.LoadingCustomOn();
                                return;

                            case "Editor":
                                ScreenManager.EditingOn();
                                return;

                            case "Credits":
                                ScreenManager.CreditsOn();
                                return;

                            case "Exit":
                                ScreenManager.ExitGame();
                                return;

                            case "Main Menu":
                                BClick_MainMenu();
                                return;

                            case "Resume":
                                PauseMenu.Unpause();
                                return;

                            case "Move":
                                BClick_Move();
                                return;

                            case "Entity":
                                BClick_Entity();
                                return;

                            case "Static":
                                BClick_Static();
                                return;

                            case "Items":
                                BClick_Items();
                                return;

                            case "Save":
                                Save();
                                return;

                            case "Save & Test":
                                if (Save())
                                {
                                    ScreenManager.Testing = true;
                                }
                                return;

                            case "Back to Editor":
                                LevelLoader.StartEditorLevel(Level.Current - 1, Level.CurrentLevelButton);
                                return;

                            case "+":
                                Plus_Minus.Plus(i);
                                return;

                            case "-":
                                Plus_Minus.Minus(i);
                                return;

                            case "Delete Map":
                                if (Level.CurrentLevelButton is WorkshopLevelButton)
                                {
                                    MessageBox.StatusMessage = new MessageBox("Workshop levels can't be deleted!", new Microsoft.Xna.Framework.Vector2(217, 190), 120);
                                }
                                else
                                {
                                    MainMethod.popupBox = new PopupBox(new string[] { "Are you sure?", "This map can not be restored", "once deleted." }, PopupType.DELETE_LEVEL);
                                }
                                return;

                            case "Publish to Workshop":
                                if (Save())
                                {
                                    LevelSaver.IsPublishingToWorkshop = true;
                                }
                                return;

                            case "Delete All Objects":
                                MainMethod.popupBox = new PopupBox(new string[] { "Are you sure?", "This will delete all objects", "in this level permanently." }, PopupType.ERASE_ALL_OBJECTS);
                                return;


                            case "Cycle Entities":
                                BClick_CycleEntities();
                                return;

                            case "Next":
                                LevelButton.NextGroup();
                                return;

                            case "Previous":
                                LevelButton.PreviousGroup();
                                return;
                            }
                        }
                    }
                }
            }
        }