Now that the game is shaping up more, it’s in need of some greater obstacle variety. In this chapter, we’ll implement “patrollers.”
Patrollers are objects that we set up with a series of points they’ll travel along. They move from one point to the next, starting at the first point and going down the list. Once they reach the last point, they double back to the first point again and then repeat the process. We can set the points up however we want and use however many points we want. If we want an obstacle to travel in a simple line back and forth, we can just use two points: ...