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); } }
public override void Update(Microsoft.Xna.Framework.GameTime gameTime) { if (ExtendedKeyboard.IsKeyDownAfterUp(Keys.Escape)) { scrapWarsApp.RevertScreen(); } // TODO: Process controls }
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; } }
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(); } }
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(); } }
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 } }