I have an alien actor type and would like to use get object to see if all the aliens have been removed so I can switch to the win screen of my game. for some reason this code:
isn't working. what am I doing wrong?
if(getWorld().getObjects(Alien.class) == null) { WinScreen w = new WinScreen(); Greenfoot.setWorld(w); getWorld().removeObject(this); }