At the end of the game, the game just restart level 5, so I added a screen where the player could either restart from level 1 or quit the game, much like the death screen.
To finish the game, I added music and sound effects when each of the actions is triggered. For the background music of the tutorial, I added “First Steps” which is from the Celeste soundtrack which fits perfectly into my game.
For levels one to five I added “Resurrections” which is also from the Celeste game soundtrack.
To do this, I had to prevent the music from playing over and over again when the user died or reset the level. I also had to keep the game object that the music was assigned to in the game, even when the scene was changed. To do this I added in line 20 so the game object would not be destroyed upon moving levels.
For the sound effects, I used https://sfxr.me/ to generate custom sound effects for each of the following; jump, hit, death and goal.
To add the sound effects to each event, I added in an Audio Source and an Audio clip. When the event occured, I played the sound with the player being the sound source. However, I ran into a problem when assigning the death sound where the player would be destroyed before it could play the death sound. Therefore, I had to create an empty game object and assign another sound source so the sound would be played using the other game object as the source.
Raine, Lena (2018) Celeste Original Soundtrack – 02 – First Steps [Video/Audio] Available online: “https://www.youtube.com/watch?v=N8OHSXvneOE&ab_channel=LenaRaine” [Accessed 24/01/2021]
Raine, Lena (2018) Celeste Original Soundtrack – 03 – Resurrections [Video/Audio] Available online: “https://www.youtube.com/watch?v=1rwAvUvvQzQ&ab_channel=LenaRaine” [Accessed 24/01/2021]