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:

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

The 7 Myths of Learning to Code

Disable Chrome’s Annoying Notification on First Start from the Linux Command Line

git hub versioning:

How to upload a plugin to WordPress Plugin directory

CI/CD Pipeline with Cloud Build

Using Expo to Bring Students Together in a Time of Social Distancing

Rubymine, add a Ruby interpreter using WSL.

Best of the Week — March 21/27

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

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

More from Medium

Tessellation in HDRP

Adding a player ammo indicator to the UI

Light her up — Adding emissions to your game objects using photoshop and blender

Creating a HUD