Quantcast
Channel: Answers by "Graham-Dunnett"
Viewing all articles
Browse latest Browse all 959

Answer by Graham Dunnett

$
0
0
Look at line 19. You ask for the high score from the player prefs, but you don't actually save it anywhere. Don't you want to assign this to the `highscore` variable? Also, on the very first time the game runs, there will not be a highscore value written into the player prefs, and so the line 19 will probably return an error. You will want to check for this scenario and set the highscore to zero.

Viewing all articles
Browse latest Browse all 959

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>