I need help please :)
what am I doing wrong? when the Bubble should 'die' Greenfoot just says this: "java.lang.IllegalStateException: Actor not in world. An attempt was made to use the actor's location while it is not in the world. Either it has not yet been inserted, or it has been removed."
and i have no idea how to fix it, but it's just really important!
public boolean getroffen() //die Methode prüft ob der Dino die einer Bubble berührt [code] public boolean dead() { Actor death=getOneIntersectingObject(Flower.class); return(death!=null); } public void dying() { if(dead()) { getWorld().removeObject(this); } }