What I Did:
Today I began making the tank health bar work properly on its own. I first began by getting the short premade script called "UI Direction Control" and attached it to the health slider game object. I then got the tank health script and attached it to the tank which required coding to complete the script. This script told the game how the colour of the health bar should be handled depending on the value of the tanks health, it also handled what it means for the tank to be dead and when it should and shouldn't be dead.. After completing the script I added the required references needed to make the script run properly.
What I Learned:
I learned how to make a UI element change its colour depending on its value.
What I'm Doing Next Day:
Next Day I will be adding the tank shells that will later be shot by the tanks and will deal damage to the opposing tank.


No comments:
Post a Comment