Time for action – structuring the game
- In the EnemyManager class, change the default value of the
Active
member fromtrue
tofalse
:public bool Active = false;
- In the
Game1.cs
file, modify the declaration for thegameState
variable to set the default toGameStates.TitleScreen
:GameStates gameState = GameStates.TitleScreen;
- Right-click on the
Fonts
folder in the content project and select Add | New Item... Create a newSpriteFont
object namedPericles14.spritefont
. - The XML file for the
SpriteFont
will open automatically. Change the<FontName>
tag fromKooteny
toPericles
. - Add the following declarations to the Game1 class:
SpriteFont pericles14; private float playerDeathDelayTime = 10f; private float playerDeathTimer = 0f; private float titleScreenTimer ...
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.