I want to make a level up screen, something among the lines of, if a persons clicks or presses a key it continues to the next level. I tried changing the background but the code didn't work. Any ideas?
Heres the code:
if(getWorld() instanceof level_1 && secs == 2){
Greenfoot.stop();
//if(Greenfoot.mouseClicked()){
// Greenfoot.setWorld(new level_2());
// }
}
if(getWorld() instanceof level_2 && secs == 3){
Greenfoot.stop();
Greenfoot.setWorld(new level_3());
}
if(getWorld() instanceof level_3 && secs == 4){
Greenfoot.stop();
}

