public void OnDeath() { isDead = true; //if highscore is registry is less than current higher score if (PlayerPrefs.GetFloat("HighScore") < score) { PlayerPrefs.SetFloat("HighScore", score); //Storing the current score } deathMenu.ToggleEndMenu(score, coinTotal); }
public void onDeath() { isDead = true; deadMenu.ToggleEndMenu(score); }