CHAPTER 3 ■ WORKING WITH 2D IMAGES/TEXTURES IN XNA 3.0
183
base.Draw(gameTime);
}
The functionality covered in these 2 recipes should allow you to create some basic 2D
games. For a hands-on series of tutorials that use only this functionality to create a complete
2D game, you can read the 2D Series of XNA Tutorials on my site at www.riemers.net.
3-3. Render Transparent Images Using Layers
The Problem
In most cases, you will want to render multiple images on top of each other. The main prob-
lem is that all images are full rectangles, so they will cover the images rendered earlier. You
also need to make sure you render the background images first.
The Solution
UsingXNA,youcanspecifythelayer,orthedepth of the images that should be rendered. ...