In this chapter, we are going to implement enemy drones that fly around the race track and attack the player by shooting laser beams. They are little annoying robotic pests that will test the player's reflexes. Our drones will have a single attack that consists of firing a continuous laser beam at a 45-degree angle. To create the illusion of autonomous intelligence, the drones can be assigned three distinct attack maneuvers at runtime. Each maneuver is a repetitive series of predictable movements. Individually, the drone's behavior may look robotic, but when they are placed in a formation at specific positions on the race track, it could look like they are forming a strategy to outmaneuver the ...
Get Game Development Patterns with Unity 2021 - Second Edition 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.