Game Development Reference
In-Depth Information
Figure 10.5
First pass of the start game menu.
The Inner Game State
For the first pass, the inner game is going to be as simple as possible. It will wait
a few seconds and then change to the game over state. It needs to pass some
information over to the game over state to report if the player won or lost
the game.
A PersistantGameData class will be used to store information about the
player, including if he had just lost or won a game. Eventually the inner game will
allow the player to play a shooting game, but not in this first pass.
The inner game level will last for a fixed period of time; if the player is alive
when the time is up the player wins. The time a level takes is described by a
LevelDescription class. For now, the only thing this class contains is how
long the level will last.
class LevelDescription
{
// Time a level lasts in seconds.
public double Time { get; set; }
}
 
Search WWH ::




Custom Search