I am trying to make a scoring system. I have a score on the layout that has the actual gameplay, but I also have a "Game Over" layout that I would like the final score from the gameplay layout. The scoring is very similiar to Flappy Bird, where once the character goes over an object, it adds +1 to the score.
I need to be able to have the final score from the game copy over to another layout.
Also, once this is worked out, I would like to implement a high score that saves the high score on the particular device. Meaning, when I play the game at another date, would like for it to keep my high score from a previous date.
Any tips on getting the scoring to work right? I have tried numerous things, including trying to do a global variable, but can't seem to get it to work right. I can only seem to get the instance variable to count the score.