Adding GameController to spawn enemy waves

We have all of the mechanics of our game completed at this point. Now, we need to actually create the game or manage what happens in the game. This game controller would be required to run our game, keep track of and display the game's score, and finally end the game whenever the player dies. Later on, we'll discuss a game state manager, which we can use for larger projects with multiple states, but for the sake of this simple project, we will create a simple game controller, and that's what we'll do now:

  1. First, create an empty game object by going to Game Object | Create Empty. From there, with the object selected, go to Inspector and set its name to Game Controller, and optionally, for neatness sake, ...

Get Unity 5: Learning C# by Developing Games now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.