Ejemplo n.º 1
0
        public static void BackToGame()
        {
            Screen game = ScreenManager.getScreen(ScreenId.Game);

            game.setState(true);

            foreach (Screen s in ScreenManager.screenIterator())
            {
                if (s is PopUpScreen)
                {
                    s.setDraw(false);
                    s.setUpdate(true);
                }
            }

            PauseScreen pause = (PauseScreen)ScreenManager.getScreen(ScreenId.Pause);

            pause.setDraw(false);
            pause.setUpdate(true);
            pause.escPressed = false;
            if (pause.isPaused())
            {
                pause.togglePause();
            }

            InventoryScreen stats = (InventoryScreen)ScreenManager.getScreen(ScreenId.Inventory);

            stats.setUpdate(true);
            stats.buttonPressed = false;
        }
Ejemplo n.º 2
0
        public static void MainMenuHelp()
        {
            MenuItemFunctions.ClosePopups();

            Screen help = ScreenManager.getScreen(ScreenId.MainMenuHelp);

            help.setState(true);
        }
Ejemplo n.º 3
0
        public static void MainMenu()
        {
            MenuItemFunctions.ClosePopups();

            MenuItemFunctions.Save(false);

            Screen mainMenu = ScreenManager.getScreen(ScreenId.MainMenu);

            mainMenu.setState(true);
        }
Ejemplo n.º 4
0
        public static void Play()
        {
            Screen mainmenu = ScreenManager.getScreen(ScreenId.MainMenu);

            mainmenu.setState(false);

            GameScreen game = (GameScreen)ScreenManager.getScreen(ScreenId.Game);

            InputScreen input = (InputScreen)ScreenManager.getScreen(ScreenId.Input);

            // This function will be called to initialize the game screens and create the player with the inputed name
            input.setTitle("Input Name:");
            input.setAction(game.init);
            input.setState(true);
        }