I have the method endLevel() in my World subclass which is called whenever the player clears the battle map:
Now, the method levelUp() includes a call to the message() method which I've tested many times and it always worked flawlessly. However, in this context, I can only see the cleared battle map for those three seconds, not the level up message. I know that the call to levelUp() is successful because the character starts the next level with updated HP and abilities, it's just the graphics that aren't updating. What am I doing wrong?
public void endLevel()
{
this.player.levelUp();
try {Thread.sleep(3000);}
catch (InterruptedException e) {}
if (this.player.level <= 5)
{
this.state = TAVERN;
constructTavern();
}
else finishGame();
}