Gaming Art | Creating the HUD: Lives, Oxygen bar + Main Menu + Game Over panel
The main menu looks like this:
I haven't implemented the shop yet, and I hope I have enough time to do it!
The HUD has three lives, an oxygen bar that decreases gradually and points you can earn by collecting astronaut food.
I had some problems with the bar at first because I had declared two floats in the same line like this:
public float currentOx, maxOx = 100;
and I thought you can initialize both variables at the same time with the same value, but no, you have to assign a value to both of them independently.
And finally I implemented a Game Over panel with two buttons to Try Again or to Exit the game to the Main Menu. This just appears if the player dies. Also the objects stop moving to the left in the background and the user can't move the player anymore.
Useful links:
Comments
Post a Comment