更新时间:2021-04-13 16:52:54
封面
版权页
Credits
About the Author
About the Reviewers
Preface
What you need for this book
Who this book is for
Conventions
Time for action – heading
Reader feedback
Customer support
Chapter 1. Introducing XNA Game Studio
System requirements
Installing XNA Game Studio
Time for action – installing XNA Game Studio
Building your first game
Time for action – creating a new Windows game project
Time for action – adding variables to the class declaration area
Time for action – customizing the Initialize() method
Time for action – creating the squareTexture
Time for action – coding Update() for SquareChase
Time for action – draw SquareChase!
Time for action – play SquareChase!
Summary
Chapter 2. Flood Control – Underwater Puzzling
Time for action – set up the Flood Control project
Introducing the Content Pipeline
Time for action – reading textures into memory
Sprites and sprite sheets
Classes used in Flood Control
The GamePiece class
Time for action – build a GamePiece class – declarations
Time for action – building a GamePiece class: constructors
Time for action – GamePiece class methods – part 1 – updating
Time for action – GamePiece class methods – part 2 – rotation
Time for action – GamePiece class methods – part 3 – connection methods
Time for action – GamePiece class methods – part 4 – GetSourceRect
The GameBoard class
Time for action – create the GameBoard.cs class
Time for action – initialize the game board
Time for action – manipulating the game board
Time for action – filling in the gaps
Time for action – generating new pieces
Time for action – water in the pipes
Time for action – making the connection
Building the game
Time for action – Game1 declarations
Time for action – updating the Initialize() method
Time for action – drawing the screen – the title screen
Time for action – drawing the screen – the play screen
Time for action – scores and scoring chains
Time for action – handling mouse input
Time for action – letting the player play
Play the game
Chapter 3. Flood Control – Smoothing Out the Rough Edges
Time for action – rotating pieces
Time for action – falling pieces
Time for action – fading pieces
Time for action – updating GameBoard to support animatedpieces
Time for action – generating fading pieces
Time for action – generating falling pieces
Time for action – modify Game1 to generate rotating pieces
Time for action – updating Game1 to update animated pieces
Time for action – update Game1 to draw animated pieces
SpriteFonts
Time for action – add SpriteFonts to Game1
Time for action – drawing the score
Time for action – creating the ScoreZoom class
Time for action – updating and displaying ScoreZooms
Time for action – game over
The flood
Time for action – tracking the flood
Time for action – displaying the flood
Time for action – adding difficulty levels
Chapter 4. Asteroid Belt Assault – Lost in Space
Time for action – creating the Asteroid Belt Assault project
Another definition for "sprite"
Time for action – declarations for the Sprite class
Time for action – Sprite constructor
Time for action – basic Sprite properties
Time for action – animation and drawing properties
Time for action – supporting collision detection
Time for action – adding animation frames
Time for action – updating the Sprite
Time for action – drawing the Sprite
A sprite-based star field
Time for action – creating the StarField class
Time for action – updating and drawing the StarField
Time for action – viewing the StarField in action
Animated sprites – asteroids
Time for action – building the AsteroidManager class
Time for action – positioning the asteroids
Time for action – checking the asteroid's position
Time for action – updating and drawing asteroids
Time for action – bouncing asteroids – part 1
Time for action – bouncing asteroids – part 2
Player and enemy shots