Hello,
I have a health bar in my game and are where health bar should be displayed is 197 px long. So my health bar, no matter how much health I have, must fit in there ( like in World of Warcraft ). I need to get the width. I tried like this:
new Rect( x, y, 197 * (curHealth / maxHealth), height);
It’s not working. When you have max health it’s working when you don’t it’s 0.
Best regards,
Ivan