I have to make a high score display on the game over and menu scene, Right now I have just once you die, it displays the score you had gotten from that run on the game over scene and then resets wen you go back to menu. I have no idea how to use player prefs at all. No idea how to save or retrieve date from it. Basically I need to save the scores I get and then make the one with the highest value display on a different (the gameover and menu) scenes.
Score Script(JAVA):
static var CurrentScore : int;
var InternalScore : int;
var ScoreText : GameObject;
function Update () {
InternalScore = CurrentScore;
ScoreText.GetComponent.().text = "" + InternalScore;
}
Thanks!
↧