Exemple #1
0
 public override void Update(Microsoft.Xna.Framework.GameTime gameTime)
 {
     if (ExtendedKeyboard.IsKeyDown(Keys.Escape))
     {
         scrapWarsApp.ChangeScreen(new MainMenu(scrapWarsApp, graphics, window));
     }
     // Process input
 }
        private void DebugControls(GameTime gameTime)
        {
            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Escape))
            {
                battle.EndBattle();
            }

            // TODO modify extended keyboard to facilitate "time between" logic
            if (ExtendedKeyboard.IsKeyDown(Keys.W))
            {
                MoveView(0, -1);
            }
            if (ExtendedKeyboard.IsKeyDown(Keys.S))
            {
                MoveView(0, 1);
            }
            if (ExtendedKeyboard.IsKeyDown(Keys.A))
            {
                MoveView(-1, 0);
            }
            if (ExtendedKeyboard.IsKeyDown(Keys.D))
            {
                MoveView(1, 0);
            }

            if (ExtendedKeyboard.IsKeyDown(Keys.Left))
            {
                MoveCardSelectLeft( );
            }
            if (ExtendedKeyboard.IsKeyDown(Keys.Right))
            {
                MoveCardSelectRight( );
            }

            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Space))
            {
                battle.BattlePaused = false;
                battle.RoundStart   = gameTime.TotalGameTime.TotalMilliseconds;
                cardNum             = 0;
            }
        }