The flock variety
There is one last set of assets we need to create for our levels, the other birds. We will create three more birds that each have a unique special ability: a yellow bird that accelerates, a blue bird that splits into multiple birds, and a black bird that explodes. With these our flock will be complete.
To make the creation of these birds easier, we will be making use of a concept called inheritance. Inheritance allows a script to expand upon the functions it is inheriting without the need to rewrite them. If used correctly, this can be very powerful and, in our case, will aid in the quick creation of multiple characters that are largely similar.
The yellow bird
First, we will create the yellow bird. Largely, this bird functions exactly as the red bird. However, when the player touches the screen, the bird's speed increases. By extending the Bird
script that we created earlier, this bird's creation becomes quite simple.