Outcome: The player will be able to press Space and launch a prefab projectile prefab, which destroys itself when it moves out of view. Animals are removed when they leave the bounds of the scene.

Overview

In this lesson, you will allow the player to launch the projectile through the scene. First you will write a new script to send the projectile forwards. Next you will store the projectile along with all of its scripts and properties using an important new concept in Unity called Prefabs. The player will be able to launch the projectile prefab with a tap of the spacebar. Finally, you will add boundaries to the scene, removing any objects that leave the screen.