Adding GameController to spawn enemy waves

We have all 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 single game controller. That's what we'll do now:

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

Get Unity Game Development Blueprints now with O’Reilly online learning.

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