Game Development Reference
In-Depth Information
if (result == EntryMenuStates.NextCharacterPressed)
{
m_HighScoreEntryMenu.ProcessNextMenuSelection();
}
else
if (result == EntryMenuStates.PreviousCharacterPressed)
{
m_HighScoreEntryMenu.ProcessPreviousMenuSelection();
}
else
if (result == EntryMenuStates.Enter)
{
m_HighScoreEntryMenu.ProcessEnterMenuSelection();
if (m_HighScoreEntryMenu.IsEntryFinished())
{
char[] Initials = m_HighScoreEntryMenu.GetEntry();
String StrInitials = new String(Initials);
CreateHighScoreEntry(StrInitials, m_Score);
m_GameState = GameState.HighScoreTable;
m_HighScoreEntryMenu.ResetMenu();
}
}
return;
}
For the CheckTouch() function modifications
1.
If the main menu is being displayed, get the main menu's status in terms of
finding out what menu item has been pressed.
a.
If the new game menu item has been pressed, reset the game and set the game state
to ActiveGamePlay.
b. If the continue current game menu item has been pressed, load the m_CanContinue
status. If the status is true, load the previously saved game; otherwise, reset the
game. Set the game state to ActiveGamePlay.
c.
If the high score table menu item has been selected, set the game state to
HighScoreTable.
d. If the copyright menu item has been selected, set the game state to HighScoreEntry
to activate the high score entry menu. This is a debug button that will be commented
out in the final game. In this chapter, we use it to test the high score menu entry
system.
2.
If the high score table is being displayed, set the game state to the
main menu.
Search WWH ::




Custom Search