Ok so I ran into another Problem. I want to have health in my game, like a health bar. I got 3 pictures each one with the amount of health every time you get hit. Now what I need is the code. In the code I want to remove the first picture of the health bar and put in the second one when I get hit. I don't know how to do this. I know how to put the second one in but I don't know how to remove the first one.
This is what I have so far.
public void kalb()
{
if (canSee(Spaceship.class) )
{
eat(Spaceship.class);
getWorld().addObject(new Spaceship(), 80, 500);
(I don't know how to remove the picture of health) (class name is Three)
(Adding the second picture of health) (class name is Two)
Greenfoot.playSound("EXPLOSAO.mp3");
}
}
I'd rather not have the spaceship eaten and added though.
HELP IS HIGHLY APPRECIATED!! :D

