Beispiel #1
0
        void newGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            const string message = "Bist du sicher das du neu Starten willst?";

            MessageBoxScreen newGameMessageBox = new MessageBoxScreen(message);
            newGameMessageBox.Accepted += NewGameMessageBox;
            ScreenManager.AddScreen(newGameMessageBox, ControllingPlayer);
        }
Beispiel #2
0
        /// <summary>
        /// Event handler for when the Quit Game menu entry is selected.
        /// </summary>
        void QuitGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            const string message = "Bist du sicher das du das Spiel beendet willst?";

            MessageBoxScreen confirmQuitMessageBox = new MessageBoxScreen(message);

            confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted;

            ScreenManager.AddScreen(confirmQuitMessageBox, ControllingPlayer);
        }
Beispiel #3
0
 /// <summary>
 /// Event handler for when the Frobnicate menu entry is selected.
 /// </summary>
 void FrobnicateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     frobnicate = !frobnicate;
     SetMenuEntryText();
 }
Beispiel #4
0
        /// <summary>
        /// Event handler for when the Elf menu entry is selected.
        /// </summary>
        void ElfMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            elf++;

            SetMenuEntryText();
        }
Beispiel #5
0
        /// <summary>
        /// Event handler for when the Ungulate menu entry is selected.
        /// </summary>
        void UngulateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            currentUngulate++;
            if (currentUngulate > Ungulate.Llama)
                currentUngulate = 0;

            SetMenuEntryText();
        }
Beispiel #6
0
 /// <summary>
 /// Event handler for when the Language menu entry is selected.
 /// </summary>
 void LanguageMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     currentLanguage = (currentLanguage + 1) % languages.Length;
     SetMenuEntryText();
 }
Beispiel #7
0
 void NewGameMessageBox(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                       new GameplayScreen());
 }
Beispiel #8
0
 /// <summary>
 /// Event handler for when the user selects ok on the "are you sure
 /// you want to quit" message box. This uses the loading screen to
 /// transition from the game back to the main menu screen.
 /// </summary>
 void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                                                    new MainMenuScreen());
 }
Beispiel #9
0
 /// <summary>
 /// Helper overload makes it easy to use OnCancel as a MenuEntry event handler.
 /// </summary>
 protected void OnCancel(object sender, PlayerIndexEventArgs e)
 {
     menuButtonPress.Play();
     OnCancel(e.PlayerIndex);
 }
Beispiel #10
0
 /// <summary>
 /// Event handler for when the Options menu entry is selected.
 /// </summary>
 void SteuerungsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new SteuerungsMenuScreen(), e.PlayerIndex);
 }
Beispiel #11
0
 /// <summary>
 /// Event handler for when the Play Game menu entry is selected.
 /// </summary>
 void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new GameplayScreen());
 }
Beispiel #12
0
 /// <summary>
 /// Event handler for when the Options menu entry is selected.
 /// </summary>
 void OptionsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new OptionsMenuScreen(), e.PlayerIndex);
 }
Beispiel #13
0
 /// <summary>
 /// Event handler for when the user selects ok on the "are you sure
 /// you want to exit" message box.
 /// </summary>
 void ConfirmExitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.Game.Exit();
 }