I have code that calculates score based on distance. How would I go about getting this code to remember the high score after the game is quit? Thanks in advance.
#pragma strict
var player : Transform;
function Update ()
{
var dist : int = Vector3.Distance(player.position, transform.position);
print ("Distance : " + dist);
var score : int = dist / 5.5;
guiText.text = "Score : " + score;
}
↧