In this chapter, we are going to continue structuring our game by applying a Singleton design pattern to our GameManager script. This will allow our game to move on to another scene while keeping the script managers functioning and preventing them from being wiped (thereby preserving our data). We will then make a start with other details of our script and observe how information (such as the player's lives) travels through the game's frameworks. If and when the player dies, a life is deducted. If and when the player loses all of their lives, the game over scene will be triggered.
We will be extending our original code and introducing enemy points so that when we hit our enemies with bullets, the enemy will disappear as usual but will also generate points. This scoring mechanism will be handled by a new score manager that we will be creating.
We'll also be...