Summary

You now have a working Flood Control game. In this chapter we have looked at:

  • Adding content objects to your project and loading them into textures at runtime using an instance of the ContentManager class
  • Dividing the code into classes that represent objects in the game
  • Building a recursive method
  • Use the SpriteBatch.Draw() method to display images
  • Divide the Update() and Draw() code into different units based on the current game state

In Chapter 3, we will spruce up the Flood Control game, adding animation by modifying the parameters of the SpriteBatch.Draw() method and creating text effects in order to make the game visually more appealing.

Get XNA 4.0 Game Development by Example Beginner's Guide 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.