XNA 4 3D Game Development by Example:Beginner's Guide
上QQ阅读APP看书,第一时间看更新

Time for action – creating the Cube Chaser project

  1. Open Visual Studio 2010 and select File | New | Project... from the menu bar.
  2. Open the Visual C# tree in the Installed Templates portion of the New Project window, and open the XNA Game Studio 4.0 tree under it.
  3. Select the Windows Game (4.0) project template from the central portion of the window.
  4. Under Name, enter Cube Chaser and click the Ok button.
  5. After Visual Studio has created the solution, right-click on the Game1.cs file in the Solution Explorer window and select Rename.
  6. Change the name of the file to CubeChaserGame.cs. When asked if you wish to update the references to the file, click Yes.

What just happened?

We now have the shell for our Cube Chaser game. We could have left our main game class as Game1 as we did for the Speller game, but giving the class a more descriptive name helps to keep our code as self-documenting as possible.