Unity 3D tutorial – part 3
For the final part of our tutorial, we are going to set the final touches to the Space Invaders prototype. The barriers which protect the player's ship, a game won/game lost event, the GUI, the audio, and some particle effects to improve the overall appeal of the game.
The barriers
We will create destructible barriers by assembling a number of small cubes in the shape of the barriers of the original Space Invaders.
Add a Cube to the game scene and size it as you see fit (we suggest you not to scale it too small or you may face problems with collision detection). Now create a new prefab in the
Prefab
folder and drag the cube from the scene into the newly created prefab. Name itBrick
and make it green like the player's ship.Now we need to create several instances of this prefab to shape the barrier. You can do that by selecting the
Brick
in the Hierarchy panel and pressing Ctrl + D to duplicate it. Then position each duplicatedBrick
to create a shape like the one...