/// <summary>
        /// Event handler for when the Ungulate menu entry is selected.
        /// </summary>
        void BreakItDownMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                               new GameplayScreen());

            SetMenuEntryText();
        }
        /// <summary>
        /// Event handler for when the Quit Game menu entry is selected.
        /// </summary>
        void QuitGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            const string message = "Are you sure you want to quit this game?";

            MessageBoxScreen confirmQuitMessageBox = new MessageBoxScreen(message);

            confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted;

            ScreenManager.AddScreen(confirmQuitMessageBox, ControllingPlayer);
        }
Пример #3
0
 void msgSoal_Accepted(object sender, PlayerIndexEventArgs e)
 {
     invokeSoal();
 }
Пример #4
0
 void msgHukum_Accepted(object sender, PlayerIndexEventArgs e)
 {
     //ExitScreen();
     tabChoosable = true;
     wheel.isSpinnable = true;
 }
Пример #5
0
 void buttonSpin_Selected(object sender, PlayerIndexEventArgs e)
 {
     isResultShown = false;
     wheel.alreadyCalculated = false;
     wheel.spin();
     wheel.isSpinnable = false;
     tabChoosable = false;
 }
Пример #6
0
        /// <summary>
        /// Event handler for when the Frobnicate menu entry is selected.
        /// </summary>
        void FrobnicateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            frobnicate = !frobnicate;

            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();
        }
 /// <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 StepOptionsMenuScreen(), e.PlayerIndex);
 }
 /// <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();
 }
Пример #10
0
        void msgTrue_Accepted(object sender, PlayerIndexEventArgs e)
        {
            if(activePlayer == 0){
                GameplayScreen.skorPlayer1 += 100;
            }

            if (activePlayer == 1)
            {
                GameplayScreen.skorPlayer2 += 100;
            }

            if (activePlayer == 2)
            {
                GameplayScreen.skorPlayer3 += 100;
            }
            ExitScreen();
        }
Пример #11
0
        void buttonOption_Selected(object sender_, PlayerIndexEventArgs e)
        {
            TextureButton sender = (TextureButton) sender_;

            string ans = "";
            for (int i = 0; i < buttons.Count; i++)
            {
                if (buttons[i] == sender)
                {
                    ans += (char)(65 + i);
                }
            }
            //Console.WriteLine("answer: " + ans);

            processAnswer(ans);
        }
Пример #12
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);
 }
Пример #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();
 }
Пример #14
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);
 }
Пример #15
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 BackgroundScreen("bg_game"), new GameplayScreen());
 }
 /// <summary>
 /// Event handler for when the Frobnicate menu entry is selected.
 /// </summary>
 void DanceItMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     SetMenuEntryText();
 }
Пример #17
0
 void msg_Accepted(object sender, PlayerIndexEventArgs e)
 {
     GameplayScreen.soal = null;
     ExitScreen();
 }
 /// <summary>
 /// Event handler for when the Options menu entry is selected.
 /// </summary>
 void OptionsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new OptionsMenuScreen(), e.PlayerIndex);
 }
Пример #19
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 BackgroundScreen("bg_game"), new GameplayScreen());
 }
Пример #20
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();
        }
Пример #21
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();
        }
Пример #22
0
        /// <summary>
        /// Event handler for when the Elf menu entry is selected.
        /// </summary>
        void ElfMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            elf++;

            SetMenuEntryText();
        }
Пример #23
0
        /// <summary>
        /// Event handler for when the Frobnicate menu entry is selected.
        /// </summary>
        void FrobnicateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            frobnicate = !frobnicate;

            SetMenuEntryText();
        }
Пример #24
0
 void buttonShow_Selected(object sender, PlayerIndexEventArgs e)
 {
     tabChoosable = true;
     wheel.isSpinnable = true;
     MessageBoxScreen msg = new MessageBoxScreen("Tekan enter bila sudah siap!", false, new Vector2(500, 300));
     msg.Accepted += new EventHandler<PlayerIndexEventArgs>(msg_Accepted);
     soal = new SoalScreen(activePlayer, wheel.choosenOption);
     ScreenManager.AddScreen(soal, ControllingPlayer);
     ScreenManager.AddScreen(msg, ControllingPlayer);
 }
Пример #25
0
        /// <summary>
        /// Event handler for when the Elf menu entry is selected.
        /// </summary>
        void ElfMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            elf++;

            SetMenuEntryText();
        }
Пример #26
0
 void buttonTab3_Selected(object sender, PlayerIndexEventArgs e)
 {
     if (tabChoosable)
     {
         activePlayer = 2;
         wheel.reset();
     }
 }
Пример #27
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());
 }
Пример #28
0
 void msgPernah_Accepted(object sender, PlayerIndexEventArgs e)
 {
     wheel.isSpinnable = true;
 }
Пример #29
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);
 }
Пример #30
0
 void msg_Accepted(object sender, PlayerIndexEventArgs e)
 {
     if (soal != null)
     {
         soal.activate();
     }
 }
 /// <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());
 }