How do I remove an object in greenfoot? I tried doing Actor object= getOneObjectAtOffset(39, 225, Object.class); and then getWorld().removeObject (object); inside an if statement. It compiles but the objects are not being removed at the correct time. How do I do this and what am I doing wrong?
