

After the second playtest, I knew I had to finish up on the HUD and get it condensed but fully functional. This gave me a list of things to do.
- Add the dash cooldown code
- Add terrashard counter and icon
- Update heart icons + add key icon for E-Jay as he asked for it
- condense HUD for more screen space

Research
By this point in time, I’ve become experienced with Unity from all my other problems and just understanding the different coding calls, therefore I don’t require a tutorial to aid me on this one.
Coding
Before going to work on the new HUD assets, I decided to code the terrashard counter and dash cooldown first to get that out of the way. This would be the longest thing to do in the process.
Dash Code + Setup
Counter Code + Setup




I started with the dash cooldown script first. I made variables and a field to implement the dash icon within, so it knows what to show when active. It utilises the fill feature in the inspector, where it fills the empty space with the icon when active, therefore, the start method included the fill amount being 0, so that it doesn’t show at the beginning. Within the update method, I made it so that when the cooldown bool from the player movement script is called and explored. If the cooldown timer is less than or equal to 0, then it sets the cooldown to false and makes it invisible. However, when the dash key is pressed and the coolingdown bool is set to false, then the method TriggerCooldown will occur. This method makes the cooldown timer begin and fills the image up with the icon matching the speed of the current dash cooldown speed from another script.
The terrashard counter shares information with the player inventory script that E-Jay began on. I linked my terrashard counter script to his using a public int and called it in his script as well, and dropped my script in the inspector too. For my code, I referenced the text mesh and E-Jays code at the beginning to set up. There was no need for a starting method, so I just went straight to the Update method. In there, I made the text equal to the current player inventory terrashard count and made it a string, so it would update the text with the number.
Updating HUD Assets


I started by creating an actual icon for the dash and made it pixelated. Then I condensed the HUD as much as I possibly could without losing the integrity of the design. I then made the terrashard icon, utilising the placeholder I used before. I also repurposed the key skill tree icon for the UI Key to keep everything consistent. I then made the heart icons include more pixels, which allowed for more detail; this would then match the new detail of the HUD.





I asked for opinions from my teammates after I completed it, for their opinion, to see if I needed to do any final tweaks.
Personal Review
I liked how the HUD turned out, and I am really proud of it. The others loved it too, and I feel as though it matches its purpose perfectly whilst also doing even more past that. This has given me a love for UI, and I want to explore this more in the future.