© Casey Hardman  2020
C. HardmanGame Programming with Unity and C#https://doi.org/10.1007/978-1-4842-5656-5_31

31. More Tower Types

Casey Hardman1 
(1)
West Palm Beach, FL, USA
 

At last, it’s time to implement our final three tower types: Cannon Towers, for which we’ll need to implement a projectile that arcs; Hot Plates, which will be surprisingly easy; and Barricades, which will be even easier yet.

Arcing Projectiles

Our Cannon Tower projectile is intended to curve downward as it travels toward its mark. It’s far from a grand flourish, but it will give a little extra sense of weight to our so-called cannonballs.

The projectile will use its “speed” value to determine how fast it travels toward its target on the X and Z axes – outward from the tower. ...

Get Game Programming with Unity and C#: A Complete 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.