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?
1 2 3 4 5 6 | if (getWorld().getObjects(Alien. class ) == null ) { WinScreen w = new WinScreen(); Greenfoot.setWorld(w); getWorld().removeObject( this ); } |