コード例 #1
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);
 }
コード例 #2
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)
        {
            GameStateManagementGame.menuselect.Play();

            ScreenManager.Game.Exit();
        }
コード例 #3
0
        /// <summary>
        /// Event handler for when the Options menu entry is selected.
        /// </summary>
        void controlsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            GameStateManagementGame.menuselect.Play();

            ScreenManager.AddScreen(new ControlsScreen(), e.PlayerIndex);
        }
コード例 #4
0
        /// <summary>
        /// Event handler for when the Play Game menu entry is selected.
        /// </summary>
        void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            GameStateManagementGame.menuplay.Play();

            GameStateManagementGame.gameSongsCue.Stop(new AudioStopOptions());

            GameStateManagementGame.music = 0;

            LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, gamePlayScreen);
        }
コード例 #5
0
        /// <summary>
        /// Event handler for when the Frobnicate menu entry is selected.
        /// </summary>
        void FrobnicateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            frobnicate = !frobnicate;

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

            SetMenuEntryText();
        }
コード例 #7
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();
        }
コード例 #8
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();
        }