Beispiel #1
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());
     ScreenManager.AddScreen(new GameplayScreen(), e.PlayerIndex);
 }
Beispiel #2
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);
 }
Beispiel #3
0
 /// <summary>
 /// Event handler for when the Options menu entry is selected.
 /// </summary>
 /*void ControlsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new ControlsMenuScreen(), e.PlayerIndex);
 }*/
 void CreditsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new CreditsMenuScreen(), e.PlayerIndex);
 }
Beispiel #4
0
        /// <summary>
        /// Event handler for when the Frobnicate menu entry is selected.
        /// </summary>
        void FrobnicateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            frobnicate = !frobnicate;
            if (frobnicate) SoundEffect.MasterVolume = 1.0f;
            else SoundEffect.MasterVolume = 0.0f;

            SetMenuEntryText();
        }
Beispiel #5
0
        /// <summary>
        /// Event handler for when the Elf menu entry is selected.
        /// </summary>
        void ElfMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            elf++;

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

            if (currentUngulate > Ungulate.High)
                currentUngulate = 0;

            MediaPlayer.Volume = (int)currentUngulate * 0.5f;

            SetMenuEntryText();
        }
Beispiel #7
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 #8
0
 /// <summary>
 /// Event handler for when the Quit Game menu entry is selected.
 /// </summary>
 void QuitGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                                                   new MainMenuScreen());
 }