Exemple #1
0
 /// <summary>
 /// Event handler for when the Play Game menu entry is selected.
 /// </summary>
 void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     PowerHourGame.mSound.Play(Sound.SoundFX.liquid);
     ScreenManager.RemoveScreen(this);
     ScreenManager.AddScreen(new BackgroundScreen(), null);
     //ScreenManager.AddScreen(new avatarBackgroundScreen(), e.PlayerIndex);
     ScreenManager.AddScreen(new MainMenuScreen(), e.PlayerIndex);
     //LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
     //                   new MainMenuScreen());
 }
Exemple #2
0
        /// <summary>
        /// Event handler for when the Quit Game menu entry is selected.
        /// </summary>
        void QuitGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            PowerHourGame.mSound.Play(Sound.SoundFX.button);
            const string message = "Are you sure you want to quit this game?";

            MessageBoxScreen confirmQuitMessageBox = new MessageBoxScreen(message);

            confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted;

            ScreenManager.AddScreen(confirmQuitMessageBox, ControllingPlayer);
        }
Exemple #3
0
 void ConfirmExitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
 {
     //Guide.ShowMarketplace(ControllingPlayer.Value);
     ScreenManager.Game.Exit();
 }
        /// <summary>
        /// Event handler for when the Frobnicate menu entry is selected.
        /// </summary>
        void FrobnicateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            frobnicate = !frobnicate;

            SetMenuEntryText();
        }
Exemple #5
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,e.PlayerIndex, new BackgroundScreen(),new MainMenuScreen());
 }
        /// <summary>
        /// Event handler for when the Elf menu entry is selected.
        /// </summary>
        void ElfMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            elf++;

            SetMenuEntryText();
        }
        /// <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();
        }
        /// <summary>
        /// Event handler for when the Language menu entry is selected.
        /// </summary>
        void LanguageMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            currentLanguage = (currentLanguage + 1) % languages.Length;

            SetMenuEntryText();
        }
Exemple #9
0
 /// <summary>
 /// Helper overload makes it easy to use OnCancel as a MenuEntry event handler.
 /// </summary>
 protected void OnCancel(object sender, PlayerIndexEventArgs e)
 {
     OnCancel(e.PlayerIndex);
 }
Exemple #10
0
 void selectedSource0(object sender, PlayerIndexEventArgs e)
 {
     PowerHourGame.mSound.Play(Sound.SoundFX.liquid);
     //GameScreen[] screenstolaod = new GameScreen[2];
     //screenstolaod[1] = new MainMenuScreen();
     //screenstolaod[0]=new avatarBackgroundScreen();
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new BackgroundScreen(), new MainMenuScreen());
 }