Phase I — Progress Report — Player Ammo System changes

Luke Duckett
May 4, 2021

--

This is just a quick update to show the changes to the player ammo system.

Previously I set the maximum player ammo to 15 this made the game a little too difficult.

I have now doubled this amount and added a UI element to show the current ammo count AND the maximum ammo amount as well as included a starting ammo amount. These values are all editable in the inspector.

I have used Mathf.Clamp to ensure the ammo amount stays between 0 and the maximum ammo amount.

This function takes 3 numbers (can be ints or floats), a starting number, a minimum number, and a maximum number. If the value returned is outside the minimum or maximum it will be set to the correct minimum/maximum number.

We just need to test this functionality.

That's all for now.

--

--

Luke Duckett
Luke Duckett

Written by Luke Duckett

🎮 First Nations Unity Dev from Wonnarua country 🏞️ | From Player to Lifelong Learner: Crafting Games, Debugging Code, and Embracing New Technology

No responses yet