Summary
We have built a TextureHolder
class to contain all the images used as textures by our sprites and coded a Zombie
class that we can reuse to make as many zombies as we want.
You might have noticed that the zombies don’t appear to be very dangerous. They just drift through the player without leaving a scratch. Currently, this is a good thing because the player has no way to defend themself.
In the next chapter, we will make two more classes: one for ammo and health pickups and one for bullets that the player can shoot. After we have done that, we will learn how to detect collisions so that the bullets and zombies do some damage and the pickups can be collected by the player.