2D Shooter: Tweaking the Ammo Display

Sabrina Windsor
Aug 26, 2021

Objective: Change the ammo display so it shows both current ammo and the max amount of ammo.

Let’s go to our UIManager script and add a new variable.

Now wherever the display get’s changed we need to make sure to add “/” and the max ammo afterward.

Don’t forget where the ammo gets updated.

And when the ammo counter flickers at empty.

Now our ammo counter looks a little bit nicer.

--

--

Sabrina Windsor

Currently learning to code with the help of GamedevHQ in order to someday my my game ideas come to life!