O'Reilly logo

Getting Started with Unity 5.x 2D Game Development by Francesco Sapio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Game Manager

In the previous chapter, we introduced the GameMangerScript, but even after the second implementation of waypoints, we have left this script empty with no use. However, we do indeed need a game manager in our game to handle a couple of things. So, in case you have erased it from the last chapter, recreate it, along with a game object in the scene with such a script attached (the same way as if you erased the reference from the PandaScript, because we will need it later on).

We will use the Game Manager as a hub for exchanging information between the player's health and the Pandas. In fact, the Game Manager will spawn Pandas in the scene divided into waves, and it's the only script to be aware of when the level starts and finishes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required