Exemplo n.º 1
0
        private void ProcessInput()
        {
            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Escape))
            {
                scrapWarsApp.ChangeScreen(new MainMenu(scrapWarsApp, graphics, window));
            }

            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Enter) || ExtendedKeyboard.IsKeyDownAfterUp(Keys.Space))
            {
                if (currSelection == Options.Battle)
                {
                    StartBattle();
                }
                else if (currSelection == Options.Return)
                {
                    scrapWarsApp.ChangeScreen(new MainMenu(scrapWarsApp, graphics, window));
                }
            }

            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Up) || ExtendedKeyboard.IsKeyDownAfterUp(Keys.W))
            {
                SetSelection((int)currSelection - 1);
            }
            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Down) || ExtendedKeyboard.IsKeyDownAfterUp(Keys.S))
            {
                SetSelection((int)currSelection + 1);
            }
        }
Exemplo n.º 2
0
        public override void Update(Microsoft.Xna.Framework.GameTime gameTime)
        {
            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Escape))
            {
                scrapWarsApp.RevertScreen();
            }

            // TODO: Process controls
        }
Exemplo n.º 3
0
        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;
            }
        }
Exemplo n.º 4
0
        public override void Update(Microsoft.Xna.Framework.GameTime gameTime)
        {
            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Escape))
            {
                scrapWarsApp.ChangeScreen(new MainMenu(scrapWarsApp, graphics, window));
            }

            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Enter))
            {
                SelectCurrentTeam();
            }

            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Left) || ExtendedKeyboard.IsKeyDownAfterUp(Keys.A))
            {
                SelectTeamLeft();
            }

            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Right) || ExtendedKeyboard.IsKeyDownAfterUp(Keys.D))
            {
                SelectTeamRight();
            }
        }
Exemplo n.º 5
0
        public override void Update(Microsoft.Xna.Framework.GameTime gameTime)
        {
            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Escape))
            {
                scrapWarsApp.ChangeScreen(new TeamSelect(scrapWarsApp, graphics, window));
            }

            // This will be more complicated when team card customization is added
            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Enter))
            {
                SelectCurrentMech();
            }

            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Left) || ExtendedKeyboard.IsKeyDownAfterUp(Keys.A))
            {
                SelectMechLeft();
            }

            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Right) || ExtendedKeyboard.IsKeyDownAfterUp(Keys.D))
            {
                SelectMechRight();
            }
        }
Exemplo n.º 6
0
        private void ProcessInput()
        {
            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Enter) || ExtendedKeyboard.IsKeyDownAfterUp(Keys.Space))
            {
                if (currSelection == Options.Exit)
                {
                    scrapWarsApp.Exit();
                }
                else
                {
                    scrapWarsApp.ChangeScreen(GetScreenFromCurrentSelection());
                }
            }

            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Up) || ExtendedKeyboard.IsKeyDownAfterUp(Keys.W))
            {
                SetSelection((int)currSelection - 1); // Move the selection up by one
            }
            if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Down) || ExtendedKeyboard.IsKeyDownAfterUp(Keys.S))
            {
                SetSelection((int)currSelection + 1); // Move the selection down by one
            }
        }