public override void Update(GameTime gameTime) { if (avaliable) { if (!inGameMenu.IsAvaliable) { if (Keyboard.GetState().IsKeyDown(Keys.Escape)) { inGameMenu.IsAvaliable = true; testGame.Pause(); } } if (testGame.isGameOver() == 1) { overMenu.IsAvaliable = true; testGame.Pause(); } if (testGame.isGameOver() == 2) { if (hiscorename == "") { this.PausePage(); hiscorename = TH_BugReporter.Program.GetDataDialog("请输入姓名", "请使用英文", "确定"); foreach (char ch in hiscorename) { if (ch < '0' || ch > 'z') { hiscorename = ""; } } this.ContinuePage(); } else { overMenu.IsAvaliable = true; testGame.Pause(); } } counterList[0].SetNumber(testGame.Lifecount); counterList[1].SetNumber(testGame.Bombcount); counterList[2].SetNumber(testGame.Scorecount); } base.Update(gameTime); }
public override void Update(GameTime gameTime) { if (avaliable) { if (!inGameMenu.IsAvaliable) { if (Keyboard.GetState().IsKeyDown(Keys.Escape)) { inGameMenu.IsAvaliable = true; testGame.Pause(); } } if (testGame.isGameOver() > 0) { overMenu.IsAvaliable = true; testGame.Pause(); } counterList[0].SetNumber(testGame.Lifecount); counterList[1].SetNumber(testGame.Bombcount); counterList[2].SetNumber(testGame.Scorecount); } base.Update(gameTime); }