Let's add the new ball games to the scene and add the components they need, which we wrote in this chapter.
For each prefab basketball, football, and paperball:
- From the Project Assets/BallGameArt/Prefabs folder, drag the prefab into the Hierarchy as a child of ThrowingGame.
- On the ball game object itself, add the BallGame script as a component.
- On its ball object, add the ThrowControl script.
- On its goal object, add the CollisionBehavior script.
- Add to the OnCollision() list, drag the GoalCanvas to the Object slot and set the GameObject.SetActive function, and then check the checkbox.
- On the GoalCanvas, add the TimedDisable script.
- On the GoalCanvas, add an AudioSource component, drag the Cheer sound ...