Quantcast
Channel: Questions in topic: "playerprefs"
Viewing all articles
Browse latest Browse all 1333

Is there a decent tutorial for a local high score table (android)?

$
0
0
Hi, I have a highscore screen in my game. Which when the game ends it displays a simple highscore. What I want to have is a few entries (say 5) eg: 1)john....999 2)bert....982 3)mike....663 4)frank.....432 5)ben....125 in a verticle list. I have searched questions and forum, youtube, googled etc which keeps bringing me back to the same results which are not really clear or easy for a newbie to understand. Can anyone help my with this or point me to a decent tutorial please? I currently have this script to set my highscore: #pragma strict var countdownTimer : countdownTimer; function Update(){ if (countdownTimer.seconds ==0); GameOver(); } function GameOver () { if(Scorecounter.Counter > PlayerPrefs.GetInt("highscore")) { PlayerPrefs.SetInt("highscore", Scorecounter.Counter); } Application.LoadLevel(3); } and this one to show it on the highscore screen (where I hope to display the highscore list): #pragma strict var highScore3dText : TextMesh; function Start(){ highScore3dText.text = "High Score: " + PlayerPrefs.GetInt("highscore").ToString(); }

Viewing all articles
Browse latest Browse all 1333

Trending Articles