void GameOver() { if (player) { if (gamewon && winningSound && winningSound.isActiveAndEnabled) { winningSound.Play(); } else if (losingSound && losingSound.isActiveAndEnabled) { losingSound.Play(); } Destroy(player.gameObject); // pilotLightningBG.SetActive (false); StartCoroutine(FadeDown(bgMusicFadeTime)); scoreBoard.SetActive(true); scoreController.ShowScores(score.GetGrade(player.Shots), score.kills, score.total, player.Shots, score.hits); } }