Chapter 32: Space SHMUP – Part 2

Most of these prototype chapters end with a “Next Steps” section that suggests things you might want to add to the game. This chapter shows you the steps to do just that for the Space SHMUP game that you built in the previous chapter.

In this chapter, you add power-ups, multiple enemies, and different weapon types to the Space SHMUP game. In doing so, you learn more about class inheritance, enums, function delegates, and several other important topics. As an added bonus, you also make the game a lot more fun!

Before attempting this chapter, you should complete Chapter 31: Space SHMUP – Part 1. Rather than downloading a starter kit for this chapter, you must instead complete Chapter 31.

Code Listing 32.9

  • vList should be replaced with points on the line inside the first for loop, as shown below.

Code Listing 32.24

  • In the field declarations at the top of the script, type should be replaced with _type.
  • In the SetType() method, type should be replaced with _type.