I'm making a game and I have a score counter. When you lose the game it takes you to a game over screen. I want to display the final score on the game over screen but I can't get it to work. help please!
thats my code to display the code and i have
in my constructor. i put that same code in my game over screen world. but it just creates a new scoreboard with zero, instead of carrying the old score over.
1 2 3 4 | public int getScore() { return scoreboard.getScore(); } |
1 2 | scoreboard = new ScoreBoard(); addObject(scoreboard, 79 , 19 ); |