Exemplo n.º 1
0
 public void HandleInput(InputHelper inputHelper)
 {
     if (currentGameState != null)
     {
         currentGameState.HandleInput(inputHelper);
     }
 }
Exemplo n.º 2
0
 public void HandleInput(InputHelper inputHelper)
 {
     //If P is pressed, and you're not currently in the settings menu, the settings menu will be opened,
     //and the gamestate where you came from will be stored for potential use
     if (inputHelper.KeyPressed(Keys.P))
     {
         if (currentGameState.ToString() == "MeesGame.SettingsMenuState")
         {
             SwitchTo(previousGameState);
         }
         else
         {
             previousGameState = currentGameState.ToString();
             SwitchTo("SettingsMenuState");
         }
     }
     if (inputHelper.KeyPressed(Keys.Escape))
     {
         SwitchTo("TitleMenuState");
     }
     if (currentGameState != null)
     {
         currentGameState.HandleInput(inputHelper);
     }
 }
Exemplo n.º 3
0
 public override void HandleInput(InputHelper inputHelper)
 {
     playingState.HandleInput(inputHelper);
     if (!inputHelper.KeyPressed(Keys.Space))
     {
         return;
     }
     playingState.Reset();
     GameEnvironment.GameStateManager.SwitchTo("playingState");
 }
Exemplo n.º 4
0
    public override void HandleInput(InputHelper inputHelper)
    {
        titleMenuState.HandleInput(inputHelper);
        settings.HandleInput(inputHelper);

        if (apply.Pressed)
        {
            GameSettings.ApplySettings();
        }
    }
Exemplo n.º 5
0
 public void HandleInput(InputHelper inputHelper)
 {
     playingState.HandleInput(inputHelper);
     hud.HandleInput(inputHelper);
 }