I'm doing a computer game for school. I have some objects, that one needs to click on before they reach a a certain x-coordinate. When you click on the object it is removed. I want to change the object's image just before it disappears, but "delay" will pause the whole project, which is not what I intend to do. My image change is working fine and my removal of the object is as well.
Does anyone have any suggestions as to how I can show the picture for, say, 0,2 seconds, and afterwards remove the object?
public void removeCat()
{
if(Greenfoot.mouseClicked(this)){
setImage("cat"+imageNumber+"g.png");
Greenfoot.delay(20);
getWorld().removeObject(this);
}
}

