In this section, we will see how to create our towers. This is not an easy task, but by doing this we will acquire a lot of scripting skills.
First of all, it's useful to write down what we want to achieve and define what exactly a cupcake tower is supposed to do.
The best way is to write down a list, to have clear idea of what we are trying to achieve:
A cupcake tower is able to detect pandas within a certain range.
A cupcake tower shoots a different kind of projectile according to its typology against the pandas within a certain range. Furthermore, within this range, it uses a policy to decide which panda to shoot.
There is a reload time before the cupcake tower is able to shoot again.
The cupcake tower can be upgraded (to a bigger cupcake!), increasing its stats and therefore changing its appearance.