So I am making a zombie game that once my actor enters a door it moves to the next level. The problems is I don't know what are the codes that once I run my program I can play it wherein I don't have to stop it just to move to the next level.
Greenfoot.setWorld(new Level2());