- Home /
Have player score keep adding and building
Wasn't sure how to title my question, but what I am trying to do is have it to where when the player advances to the next level, wether they die or win, their achieved score is added on top of the already highscore. So for my playerprefs only store the score from the first level but don't add the score from every other level. How would I go about doing that? Would I need to make two seperate playerprefs and combine them?
Heres my playerprefs code:
if(score > PlayerPrefs.GetInt("brickScore")){
PlayerPrefs.SetInt("brickScore", score);
basically yes, use a different "prefs" for each level!
hope it helps!
Those lines of playerprefs code is called in every level. I want the score to show the current score being added onto the highscore. But how would I do that and then how would I call the two to be displayed on the main menu? Thank you so much in advance for your reply.
Your answer
