What I want for my game is to create a score list, that is, when the player loses on the game over screen, a list appears with his man and current score and when the player restarts the world, continue with his current score and when the player overcomes it, it restarts.
this is the method i am using to capture the currency.
private void catch_monedas()
{
if(isTouching(Monedas.class))
{
removeTouching(Monedas.class);
Greenfoot.playSound("Win.wav");
score++;
updateScore();
}
}