I'm trying to make a new world when all the objects of a class are removed. I'm wondering if using the getOjbects class would work. Any suggestions?
public void isRemoved() {
getObjects(Enemey.class);
countObjects();
if(list) {
Greenfoot.playSound("upgrade.wav");
Lvl2 lvl2 = new Lvl2();
Greenfoot.setWorld(lvl2);
}
}