Framework 1: Current/Max Ammo

It is player feedback on how scr*wed you are.

Simon Truong
Jun 15, 2021

--

A mini article on how to show min/max ammo capacity to players know what to expect. What you will be needing is just the UI manager script.

The UI Manager Script

In the UI script which handles everything with UI elements. We locate the Update Ammo method which controls the adding or subtracting of ammos.

In the section where we convert the integer to string we are going to add a plus sign and in quotations add a string element. This element won’t be updated and just be static.

This function is also very useful other UI elements such as “Score” where only the numbers need to update and not the actual “Score” text.

--

--

Simon Truong

A Designer, an Illustrator and a massive tech geek aspiring to become a professional Unity Developer.