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 ...

Get Unity Android Game Development by Example Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.