public void OnGameOver() { if (isPlaying) { ui.ExitGameAnimation(); ES3.Save <int>("money", score); isPlaying = false; levelMan.StopGeneration(); ui.gameOverPopup.Open(); } }