The bad guys—our beloved enemies

To demonstrate how you can add more objects with their own behaviors and have extra control over them, we will create a new class for the enemy objects. Each enemy will move along a pre-calculated path during its lifetime, and so it needs its own update procedure. All enemies will be stored inside the enemy list of the game class and their paths will be used inside a stack that is the property of each enemy.

So, let's play Dr. Frankenstein.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset