private void GameOver() { Score.ScoreInt = 0; Properties.Settings.Default.InGame = false; Properties.Settings.Default.Save(); RGBStart gui2 = new RGBStart(); gui2.Show(); this.Hide(); }
private void ColorBtn_Click(object sender, EventArgs e) { if (Properties.Settings.Default.InGame == true) { string ColorS = RGBStart.Color; if (ColorBtn.BackColor == Color.Red & ColorS == "Red" || ColorBtn.BackColor == Color.Green & ColorS == "Green" || ColorBtn.BackColor == Color.Blue & ColorS == "Blue") { Score.ScoreInt++; ChangeColor(); PlaySound(); } else { if (Properties.Settings.Default.TopScore < Score.ScoreInt) { PlaySoundN(); MessageBox.Show("New top score! Score: " + Score.ScoreInt); Properties.Settings.Default.TopScore = Score.ScoreInt; Properties.Settings.Default.InGame = false; Score.ScoreInt = 0; Properties.Settings.Default.Save(); RGBStart gui2 = new RGBStart(); gui2.Show(); this.Hide(); } else { PlaySoundN(); MessageBox.Show("Game over! Score: " + Score.ScoreInt); Score.ScoreInt = 0; Properties.Settings.Default.InGame = false; Properties.Settings.Default.Save(); RGBStart gui2 = new RGBStart(); gui2.Show(); this.Hide(); } } } else { Properties.Settings.Default.InGame = true; } }