/// <summary> /// Constructor fills in the menu contents. /// </summary> public MainMenuScreen() : base("Main Menu") { // Create our menu entries. var playGameMenuEntry = new MenuEntry("Play Singleplayer"); var multiplayerCreateMenuEntry = new MenuEntry("Create Multiplayer Game"); var multiplayerJoinMenuEntry = new MenuEntry("Join Multiplayer Game"); var optionsMenuEntry = new MenuEntry("Options"); var exitMenuEntry = new MenuEntry("Exit"); // Hook up menu event handlers. playGameMenuEntry.Selected += PlayGameMenuEntrySelected; multiplayerCreateMenuEntry.Selected += multiplayerCreateMenuEntry_Selected; multiplayerJoinMenuEntry.Selected += multiplayerJoinMenuEntry_Selected; optionsMenuEntry.Selected += OptionsMenuEntrySelected; exitMenuEntry.Selected += OnCancel; // Add entries to the menu. MenuEntries.Add(playGameMenuEntry); MenuEntries.Add(multiplayerCreateMenuEntry); MenuEntries.Add(multiplayerJoinMenuEntry); MenuEntries.Add(optionsMenuEntry); MenuEntries.Add(exitMenuEntry); }
/// <summary> /// Joining an existing lobby /// </summary> /// <param name="client">Existing client (created in JoinScreen)</param> public LobbyScreen(NetClient client) : base("Lobby") { host = false; _characterMenuEntry = new MenuEntry(string.Empty); SetMenuEntryText(); var playTest = new MenuEntry("Play"); var back = new MenuEntry("Back"); _firstPlayer = new MenuEntry("First Player: Not Connected"); _secondPlayer = new MenuEntry("Second Player: Not Connected"); _thirdPlayer = new MenuEntry("Third Player: Not Connected"); _fourthPlayer = new MenuEntry("Fourth Player: Not Connected"); _characterMenuEntry.Selected += _characterMenuEntry_Selected; Global.GameInProgress.Exiting += GameInProgress_Exiting; back.Selected += back_Selected; playTest.Selected += playTest_Selected; MenuEntries.Add(_characterMenuEntry); MenuEntries.Add(_firstPlayer); MenuEntries.Add(_secondPlayer); MenuEntries.Add(_thirdPlayer); MenuEntries.Add(_fourthPlayer); MenuEntries.Add(playTest); MenuEntries.Add(back); _menuEntryArray = new[] { _firstPlayer, _secondPlayer, _thirdPlayer, _fourthPlayer }; Client = client; }
/// <summary> /// Creating a lobby screen /// </summary> public LobbyScreen() : base("Lobby") { host = true; _characterMenuEntry = new MenuEntry(string.Empty); SetMenuEntryText(); var back = new MenuEntry("Back"); _firstPlayer = new MenuEntry("First Player: Not Connected"); _secondPlayer = new MenuEntry("Second Player: Not Connected"); _thirdPlayer = new MenuEntry("Third Player: Not Connected"); _fourthPlayer = new MenuEntry("Fourth Player: Not Connected"); _characterMenuEntry.Selected += _characterMenuEntry_Selected; Global.GameInProgress.Exiting += GameInProgress_Exiting; back.Selected += back_Selected; play.Selected += play_Selected; MenuEntries.Add(_characterMenuEntry); MenuEntries.Add(_firstPlayer); MenuEntries.Add(_secondPlayer); MenuEntries.Add(_thirdPlayer); MenuEntries.Add(_fourthPlayer); MenuEntries.Add(play); MenuEntries.Add(back); _menuEntryArray = new[] { _firstPlayer, _secondPlayer, _thirdPlayer, _fourthPlayer }; StartClient(14242, "romero"); }
/// <summary> /// Constructor. /// </summary> public OptionsMenuScreen() : base("Options") { // Create our menu entries. _gamepadMenuEntry = new MenuEntry(string.Empty); _difficultyMenuEntry = new MenuEntry(string.Empty); _fullScreenMenuEntry = new MenuEntry(string.Empty); SetMenuEntryText(); var back = new MenuEntry("Back"); // Hook up menu event handlers. back.Selected += OnCancel; _gamepadMenuEntry.Selected += gamepadMenuEntry_Selected; _difficultyMenuEntry.Selected += _difficultyMenuEntry_Selected; _fullScreenMenuEntry.Selected += _fullScreenMenuEntry_Selected; // Add entries to the menu. MenuEntries.Add(_difficultyMenuEntry); MenuEntries.Add(_gamepadMenuEntry); MenuEntries.Add(_fullScreenMenuEntry); MenuEntries.Add(back); }
public IntroScreen() : base("Romero") { var anyKeyMenuEntry = new MenuEntry("Press A On Your Gamepad or Enter On Your Keyboard To Continue"); anyKeyMenuEntry.Selected += anyKeyMenuEntry_Selected; MenuEntries.Add(anyKeyMenuEntry); }
public GameOverScreen() : base("Game Over") { var retryMenuEntry = new MenuEntry("Retry"); var mainMenuEntry = new MenuEntry("Main Menu"); var exitMenuEntry = new MenuEntry("Quit Game"); retryMenuEntry.Selected += retryMenuEntry_Selected; mainMenuEntry.Selected += mainMenuEntry_Selected; exitMenuEntry.Selected += OnCancel; MenuEntries.Add(retryMenuEntry); MenuEntries.Add(mainMenuEntry); MenuEntries.Add(exitMenuEntry); }
public JoinScreen() : base("Join") { var local = new MenuEntry("Join Locally"); var back = new MenuEntry("Back"); back.Selected += back_Selected; local.Selected += local_Selected; MenuEntries.Add(local); MenuEntries.Add(back); }
public CharacterSelectScreen() : base("Character Select") { _characterMenuEntry = new MenuEntry(string.Empty); SetMenuEntryText(); var back = new MenuEntry("Back"); var play = new MenuEntry("Play"); play.Selected += play_Selected; back.Selected += OnCancel; _characterMenuEntry.Selected += _characterMenuEntry_Selected; MenuEntries.Add(_characterMenuEntry); MenuEntries.Add(play); MenuEntries.Add(back); }