…out of how many?!

Re-visualizing Player Ammo

Christopher West
2 min readJul 11, 2022
Photo by Tammy Doucette on Unsplash

In the last article, I implemented a new form of enemy movement. Today, I’m going to be continuing the second, and final, phase of the GameDevHQ 2D Game Development Certification track. In this article, I’ll be changing the players ammo display to include the max amount of ammo! The requirement reads as follows:

Tasks:

  • Visualize on screen the ammo count of the player in the form of current/max

Adding the Max ammo parameter

This requirement was fairly trivial. I already had the player’s ammo being displayed from the phase 1 requirement. For this requirement I really only had to add the Max ammo amount to the display and pass it in to the UI manager via the game Manager from the Player script.

UI Manager
Game Manager
Player Script
End Result

Next Time!

In this article, I changed the players ammo display to include the max amount of ammo.. Next time, I'll be changing the players ammo display to include the max amount of ammo. If you enjoyed this article, or want to come along with me as I progress on my journey, follow me at gamedevchris.medium.com.

--

--

Christopher West

Unity Game Developer, Software Engineer, Gamer, Musician, and Father. Christopher is a creative that enjoys a challenge and loves coding.