So I've just finished with my scoring system. MASSIVE credits to danpost for helping me. But now I want to have a high score in my scoreboard.
My idea is to have an actor that checks the two scores from my two players and sets the highest score. If there are higher scores then that replaces the previous highest score.
Below is my code for Player 1's score. Player 2's code is the same but Player 1 is replaced with Player 2
Let me know if more of my code is needed.
Thanks.
1 2 3 4 5 6 7 8 9 10 11 12 13 | public void increaseScore() { player1score++; showStatus(); } public void showStatus() { getWorld().showText( "Player 1 Score : " +player1score, 93 , 865 ); } protected void addedToWorld(World world) { showStatus(); } |