© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
C. HardmanGame Programming with Unity and C#https://doi.org/10.1007/978-1-4842-9720-9_29

29. Towers and Targeting

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

Now that we have enemies and projectiles ready to go, we need towers to fire at them. In this chapter, we’ll implement the framework that all of our towers will use, including a system that allows them to detect nearby enemies to target with their projectiles. We’ll also implement the Arrow Tower as our first tower, giving us a means of seeing our projectiles being fired at the enemies. This foundation will make it easier for us to implement the remaining tower types in a future chapter.

Targeters

We’ll ...

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.