So I am trying to make a ship game and it won't let me decrease the health bar when something hits it.
Here is my code for now
I just want to remove health from my Player and not from the enemy ship. Please Help!
public void act() { setLocation(getX(), getY()+1); if( getY()>=getWorld().getHeight()-0) { getWorld().removeObject(this); bar.setValue(bar.getValue()-1); } } }