What's the catch?

Using the same method that you used earlier, you should be able to figure out how to add that "catch" sound effect to the player Character when he catches a beer stein. Likewise, you want to enable the explosion1 sound effect if the player gets hit by a bomb. If you can't figure it out on your own, take a deep breath, and then go nag someone else to figure it out for you. That's called delegating, and it's a perfectly legit way to develop a game.

Tip

Perfect for smashing

Unity has all kinds of complex sound controls for playing music and other effects, but like the One Shot setting for Particle Systems, the audio.PlayOneShot command is perfect for collision sound effects. If you'd like to learn more about adding sounds and music ...

Get Unity 3D Game Development by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.