Adding Audio and Visual Effects to Our Game

In Chapter 11, Scripting Victory and Defeat, we designed and scripted our game's victory and defeat conditions. We updated our game's scripts to manage the Cucumber Man's health, including updating the HUD's health bar. We implemented our victory and end-of-game logic through scripting. We also implemented the lives remaining and enabled dynamic on-screen indicators of those lives. Lastly, we scripted the random respawning of our player character.

In this chapter, we will plan and implement audio and visual effects to help enhance overall gameplay. Specifically, we will add audio to key events in our combat system and add several special effects using Unity's Particle System to enhance the game's ...

Get Getting Started with Unity 2018 - Third Edition 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.