Friday, 26 March 2010

Health Bar

Quickly implemented a healthbar in the top corner. It works by creating a rectangle, with a constant height and the width set to the current health of the car. When the health decreases, so does the reactangle width. The current code for the healthbar is:

healthbarRect = Rect(1032, 42, (health / totalHealth) * 225, 20);

No comments:

Post a Comment