Chapter 10: Pausing the Game, Altering Sound, and a Mock Test
In this chapter, we are going to add background music to our game. Then, we will make our music fade in when the level starts, fade out when the level is completed, and stop if the player dies. After that, we will be using all the UI skills we have learned so far to create a pause screen and add some slider components to it (which will be used in the next chapter for volume controls). With the pause screen built, we will make our game pause by freezing the player, the enemies on the screen, bullets, and the moving textures. Also within the pause screen, we will be giving the player the option to resume play or quit so that the game goes back to the title screen with the use of Event ...
Get Unity Certified Programmer Exam Guide - Second 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.