public void GameOver(int points) //вывод результатов игры { m_gameMusic.Stop(); m_endMusic.PlayLooping(); GameOverLabel.Show(); RetryButton.Show(); ExitButton.Show(); MartianBattleLabel.Show(); PointsLabel.Text = "POINTS: " + points.ToString(); PointsLabel.Show(); }
private void RetryButtonHandler(object sender, EventArgs e) //кнопка повторного запуска игры { //скрытие всех лишних элементов формы GameOverLabel.Hide(); RetryButton.Hide(); ExitButton.Hide(); MartianBattleLabel.Hide(); PointsLabel.Hide(); NumbersOfLives.Value = 100; m_endMusic.Stop(); m_gameMusic.PlayLooping(); m_controlGame.StartGame(); //повторный запуск игры }
private void StartGameButtonHandler(object sender, EventArgs e) //кнопка для начала игры { //скрытие всех начальных элементов формы StartGameButton.Hide(); Ship1.Hide(); Ship2.Hide(); Ship3.Hide(); Ship4.Hide(); Ship5.Hide(); Ship6.Hide(); MartianBattleLabel.Hide(); //определение управляющего объекта m_controlGame = new Controller(this, NumbersOfLives, Platform, new TextBox[] { Ship1, Ship2, Ship3, Ship4, Ship5, Ship6 }); m_controlGame.StartGame(); //запуск игры }