Example #1
0
 override protected void KeyPressing()
 {
     if (KeyboardUtility.WasClicked(Keys.Escape) == true || XboxControllerUtility.WasClicked(PlayerIndex.One, Buttons.B))
     {
         MenuSelected(this, EventArgs.Empty);
     }
 }
Example #2
0
        virtual public void Draw(SpriteBatch aSpriteBatch)
        {
            DrawUnchangingText(aSpriteBatch);

            if (XboxControllerUtility.ControllerConnected(PlayerIndex.One))
            {
                DrawXboxControllerInstructions(aSpriteBatch);
            }
            else
            {
                DrawKeyboardInstructions(aSpriteBatch);
            }
        }
Example #3
0
 override protected void KeyPressing()
 {
     if (KeyboardUtility.WasClicked(Keys.Enter) || XboxControllerUtility.WasClicked(PlayerIndex.One, Buttons.A))
     {
         StartSelected(this, EventArgs.Empty);
     }
     else if (KeyboardUtility.WasClicked(Keys.Space) || XboxControllerUtility.WasClicked(PlayerIndex.One, Buttons.Y))
     {
         HighscoreSelected(this, EventArgs.Empty);
     }
     else if (KeyboardUtility.WasClicked(Keys.O)) //EJ stöd av XboxControll.
     {
         OptionsSelected(this, EventArgs.Empty);
     }
     else if (KeyboardUtility.WasClicked(Keys.Escape) || XboxControllerUtility.WasClicked(PlayerIndex.One, Buttons.B))
     {
         ExitSelected(this, EventArgs.Empty);
     }
 }
Example #4
0
 private void UpdateUtilities()
 {
     KeyboardUtility.Update();
     XboxControllerUtility.Update();
 }