Hello everyone, I’m currently making a game and need help making a health bar. What I want is two rectangles on red one and one green one on top. I want it so that when the variable ‘health’ is decreased, the green rectangle gets shorter to one side, showing the red bar underneath. I want it so that when the variable health = 0 the green bar will completely disappear revealing the whole red bar underneath. I want it so this health bar is it’s own class, not a shape rendered in the world class becuase I need to make multiple healthbars.
Any help is very much appreciated