hello, I am creating a shooting game with multiple levels and I was wondering how to have the game proceed to the next level once the enemies in the level are destroyed, Thanks


if (getObjects(Enemy.class).isEmpty()) Greenfoot.setWorld(new ...World()); // or if (Greenfoot.isKeyDown("x")) Greenfoot.setWorld(new ...World());