Time for action – creating the Asteroid Belt Assault project
Visit http://www.PacktPub.com and download the
0669_04_GRAPHICPACK.ZIP
file. Extract the file to a temporary location.Open Visual Studio Express Edition, and create a new XNA 4.0 Windows Game project called Asteroid Belt Assault.
In the Asteroid Belt AssaultContent project, right-click on the project name, select Add | New Folder, and add a folder called Textures. Add another folder called Fonts.
Right-click on Textures, and add the
SpriteSheet.png
andTitleScreen.png
files from the graphics pack to the project.Add declarations to the
Game1
class for game states and textures as follows:Public Enum GameStates TitleScreen Playing PlayerDead GameOver End Enum Private gameState As GameStates = GameStates.TitleScreen Private titleScreen As Texture2D Private spriteSheet As Texture2D
Update the
LoadContent()
method to load the sprite sheet:titleScreen = Content.Load(Of Texture2D)("Textures\TitleScreen") spriteSheet = Content...