Ammo Count

Let’s put a limit on the player ammo. We’ll set that to 15 with an int variable. Now we just have to add the new audio source as a serialized AudioClip and then we can swap the _audioSource when ammo hit’s zero:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Richard Morgan

Richard Morgan

22 Followers

Unity and Flutter developer interested in creating mixed-reality applications.