O'Reilly logo

Getting Started with Unity 5.x 2D Game Development by Francesco Sapio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Baking cupcakes towers

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.

What a cupcake tower does

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required