Wednesday, March 8, 2017

Day 22

Today I continued the tutorial.

I made the UI the game. I made a health bar and a heart in the lower left corner.

I made a new canvas object and called it HUDCanvas. 
Then I made an empty child of that object called HealthUI. And inside that I made an image child called Heart. And I set the sprite image to a preset heart image that came with the asset pack that looks like this:
And then I had to move it around to the bottom left corner using anchors. Unity automatically has presets to the places on the canvas so I used that.

Now it looks like this:
Next up I had to make a slider that showed how much health you have. So I made a new slider object by doing UI>Slider and made it a child of HealthUI. Now what I did next was set up some numbers that were in the tutorial to make it look good and organized in the bottom left corner.

And now it looks like this:

After this I had to set up a way to make it obvious that the player has been hurt. So inside the HUDCanvas I made an image child and called it DamageImage and I set it to a white color and made it the entire canvas in length (so filling the whole screen). And then I set the alpha to white for now so that it made it invisible. I will work more on this tomorrow maybe

Tomorrow I will continue the tutorial.

No comments:

Post a Comment