Graphics Reference
In-Depth Information
11. 2 Main Game Scene
Rather than loading different scenes for each attach wave, the game works by instantiat-
ing prefabs full of enemies into the same scene over and over until the player has no lives
remaining.
The main menu consists of a single gameObject, and the main menu script is shown
in Chapter 10.
The main game scene Hierarchy structure looks like this:
ARENA
◾
(Models that make up the environment)
⦁
Arena_Colliders
◾
(Colliders for the level)
⦁
Directional light
◾
GameController
◾
Main Camera
◾
MusicController
◾
Player_Startpoint
◾
SoundController
◾
SpawnController
◾
UI
◾
Game Over Graphic
⦁
Get Ready Graphic
⦁
Note that the game controller dynamically creates players and enemies when the
game starts. References to several prefabs and gameObjects are set in the Unity Inspector
window:
Game controller prefabs
◾
Explosion prefab (a particle effect for explosions)
⦁
Player Prefab List array containing a reference to the Top_Down_Player prefab
⦁
StartPoints array containing a reference to the Player_Startpoint gameObject
in the scene
⦁