dont worry i got it working with this simple code haha not quite as good as yours
if (health == 60)
{
getWorld().addObject(new Heart(), 283, 27);
getWorld().addObject(new Heart1(), 232, 27);
getWorld().addObject(new Heart2(), 179, 27);
}
if (health == 40)
{
getWorld().removeObjects(getWorld().getObjects(Heart.class));
getWorld().addObject(new Heart(), 232, 27);
getWorld().addObject(new Heart(), 179, 27);
}
if (health == 20)
{
getWorld().removeObjects(getWorld().getObjects(Heart.class));
getWorld().removeObjects(getWorld().getObjects(Heart1.class));
getWorld().addObject(new Heart(), 179, 27);
}
if (health == 0)
{
getWorld().removeObjects(getWorld().getObjects(Heart.class));
getWorld().removeObjects(getWorld().getObjects(Heart1.class));
getWorld().removeObjects(getWorld().getObjects(Heart2.class));
}