Beispiel #1
0
        public MainMenuState(Main game) :
            base(game)
        {
            MainMenu mainMenu = new MainMenu();

            mainMenu.Options.SetOptionFunc(0, ToMainGameState);
            mainMenu.Options.SetOptionFunc(2, OpenOptionsMenu);
            mainMenu.Options.SetOptionFunc(3, Exit);

            menus = new MenuStack();
            menus.CanExitMenuStack = false;
            menus.PushMenu(mainMenu);
            renderer = game.Renderer;
        }
 private void HandleInput()
 {
     if (KeyBind.WasCommandPressed(KeyBind.Command.Start))
     {
         menus.PushMenu(pauseMenu);
         locationText = new LocationText("Welcome to Nightvale");
     }
     if (world.DialogueBox != null)
     {
         world.DialogueBox.Input(world);
         if (world.DialogueBox.DialogueDone)
         {
             world.DialogueBox = null;
         }
     }
     player.Input();
     KeyBind.Refresh();
 }
Beispiel #3
0
        public void OpenOptionsMenu()
        {
            var optionsMenu = new OptionsMenu();

            menus.PushMenu(optionsMenu);
        }