After i remove an object, greenfoot stops an give me the error : IllegalStatException: Actor is not in world. An attempt....
my code of this class:
public void act()
{
zerstören();
move();
}
public void zerstören()
{
if (getOneIntersectingObject(Schuss.class)!= null)
{getWorld().removeObject(this);}
if ( getX() <= 0 )
{getWorld().removeObject(this);}
}
public void move()
{
setLocation(getX() - 5, getY());
}
}

