Absolutely, have you not seen examples of them in some of the scenarios here? Enter "health bar" (without the quotation marks) in the search bar at the top of the page.
Whenever the health is lowered, call a method within the healthbar class to update the image to show the new value.
Are you creating your own health bar or import one from somewhere else?
I'm not an expert on this, however you could set a private variable to the amount of bars of health in your health bar, and after every hit in the hit method minus 1 from the health variable.
Then, you'd make the health bar's image update for every number, e.g having the health variable being at 4 showing a full health bar, at 3, less, etc until 0 where you'd effectively complete a method for the actor's death. Possibly just a removeObject but maybe you want to go into more detail.