OKNEM wrote...
I didn't really get much out of that, I already knew the most of it. The text part I know, but what I do need to know is how to detect whether an object is a specific image.private Health healthbar = new Health();
private int health;
public void adjustHealth(int changeAmount)
{
health += changeAmount;
if (health > 10) health = 10;
if (health < 0) health = 0;
healthbar.setImage("health"+health+".png");
if (health == 0)
{
// game over code goes here
}
}adjustHealth(10);
if (canSee(Rocket.class))
{
((Space)getWorld()).adjustHealth(-1);
getWorld().removeObject(this);
}

