Controls
Next, we are going to give the player the ability to interact with the game. First, we will create a slingshot to throw the birds. Following that will be the creation of the camera controls. We will even create a nice background effect to round out the look of our game.
Attacking
To attack the pig fortress, we have our basic bird ammo. We need to create a slingshot to hurl that ammo at the pigs. It will also handle the spawning of the birds at the beginning of the level and automatically reload as birds are used. When the slingshot runs out of birds it will notify the LevelTracker
script and the game will end. Finally, we will create a script that will keep the physics simulation from going on for too long. We don't want the player forced to sit and watch a pig slowly roll across the screen. So, the script will, after a little while, start damping the movement of the Rigidbody components to make them stop rather than keep rolling.