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.
public int getScore() { return scoreboard.getScore(); }
scoreboard = new ScoreBoard(); addObject(scoreboard, 79, 19);