void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e) { Active = false; LoadingScreen.Load(ScreenManager, true, null, true, new BackgroundScreen(), new MainMenuScreen()); }
void QuitGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { const string message = "Are you sure you want to exit?"; MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(message, true, true); confirmExitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted; ScreenManager.AddScreen(confirmExitMessageBox, ControllingPlayer); }
void StartGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { int levelOn = 1; ControllingPlayer = e.PlayerIndex; OnStartUp = false; LoadingScreen.Load(ScreenManager, true, ControllingPlayer, true, new BackgroundScreen(), new MainMenuScreen(levelOn)); ScreenManager.FadeBackBufferToBlack(TransitionAlpha * 2 / 3); }
void HandicapMenuEntrySelected(object sender, PlayerIndexEventArgs e) { //Did you select the HandicapMenuEntry? if (e.PlayerIndex == PlayerIndex.One) { //Your handicap now has changed... handicapP1++; //if (Guide.IsTrialMode) //{ // handicapP1--; //} if (handicapP1 > Handicap.VeryHard) { handicapP1 = 0; } } #region OtherPlayers if (e.PlayerIndex == PlayerIndex.Two) { handicapP2++; if (handicapP2 > Handicap.VeryHard) { handicapP2 = 0; } } if (e.PlayerIndex == PlayerIndex.Three) { handicapP3++; if (handicapP3 > Handicap.VeryHard) { handicapP3 = 0; } } if (e.PlayerIndex == PlayerIndex.Four) { handicapP4++; if (handicapP4 > Handicap.VeryHard) { handicapP4 = 0; } } SetMenuEntryText(); #endregion }
//Ends the game :( void ConfirmExitMessageBoxAccepted(object sender, PlayerIndexEventArgs e) { ScreenManager.AddScreen(new BackgroundScreen(), e.PlayerIndex); ScreenManager.AddScreen(new StartUpScreen(), e.PlayerIndex); this.ExitScreen(); }
void ReadyGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { //Are you ready? if (e.PlayerIndex == PlayerIndex.One) { readyP1++; //You are now ready! p1JNR = false; p1R = true; numberOfPlayersReady++; if (readyP1 > Ready.Ready) { readyP1--; } ControllingPlayer = e.PlayerIndex; } #region OtherPlayers if (e.PlayerIndex == PlayerIndex.Two) { readyP2++; p2JNR = false; p2R = true; numberOfPlayersReady++; if (readyP2 > Ready.Ready) { readyP2--; } ControllingPlayer = e.PlayerIndex; } if (e.PlayerIndex == PlayerIndex.Three) { readyP3++; p3JNR = false; p3R = true; numberOfPlayersReady++; if (readyP3 > Ready.Ready) { readyP3--; } ControllingPlayer = e.PlayerIndex; } if (e.PlayerIndex == PlayerIndex.Four) { readyP4++; p4JNR = false; p4R = true; numberOfPlayersReady++; if (readyP4 > Ready.Ready) { readyP4--; } ControllingPlayer = e.PlayerIndex; } SetMenuEntryText(); #endregion UpdateReady(); }
void PlayerMenuEntrySelected(object sender, PlayerIndexEventArgs e) { //You changed your character... if (e.PlayerIndex == PlayerIndex.One) { //It is now the next AVAILABLE character. do { playerP1++; if (playerP1 > Character.Sir_Edward) { playerP1 = 0; } } while (playerP1 == playerP2 || playerP1 == playerP3 || playerP1 == playerP4); } #region OtherPlayers if (e.PlayerIndex == PlayerIndex.Two) { do { playerP2++; if (playerP2 > Character.Sir_Edward) { playerP2 = 0; } } while (playerP2 == playerP1 || playerP2 == playerP3 || playerP2 == playerP4); } if (e.PlayerIndex == PlayerIndex.Three) { do { playerP3++; if (playerP3 > Character.Sir_Edward) { playerP3 = 0; } } while (playerP3 == playerP1 || playerP3 == playerP2 || playerP3 == playerP4); } if (e.PlayerIndex == PlayerIndex.Four) { do { playerP4++; if (playerP4 > Character.Sir_Edward) { playerP4 = 0; } } while (playerP4 == playerP1 || playerP4 == playerP2 || playerP4 == playerP3); } SetMenuEntryText(); #endregion }
void JoinGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { //Are you joining? if (e.PlayerIndex == PlayerIndex.One) { joinedP1++; p1JNR = true; p1NJ = false; numberOfPlayersJoined++; do { playerP1++; if (playerP1 > Character.Sir_Edward) { playerP1 = 0; } } while (playerP1 == playerP4 || playerP1 == playerP2 || playerP1 == playerP3); if (joinedP1 > Joined.Joined) { joinedP1 = 0; p1NJ = true; } } #region OtherPlayers if (e.PlayerIndex == PlayerIndex.Two) { joinedP2++; p2JNR = true; p2NJ = false; numberOfPlayersJoined++; do { playerP2++; if (playerP2 > Character.Sir_Edward) { playerP2 = 0; } } while (playerP2 == playerP1 || playerP2 == playerP4 || playerP2 == playerP3); if (joinedP2 > Joined.Joined) { joinedP2 = 0; p2NJ = true; } } if (e.PlayerIndex == PlayerIndex.Three) { joinedP3++; p3JNR = true; p3NJ = false; numberOfPlayersJoined++; do { playerP3++; if (playerP3 > Character.Sir_Edward) { playerP3 = 0; } } while (playerP3 == playerP1 || playerP3 == playerP2 || playerP3 == playerP4); if (joinedP3 > Joined.Joined) { joinedP3 = 0; p3NJ = true; } } if (e.PlayerIndex == PlayerIndex.Four) { joinedP4++; p4JNR = true; p4NJ = false; numberOfPlayersJoined++; do { playerP4++; if (playerP4 > Character.Sir_Edward) { playerP4 = 0; } } while (playerP4 == playerP1 || playerP4 == playerP2 || playerP4 == playerP3); if (joinedP4 > Joined.Joined) { joinedP4 = 0; p4NJ = true; } } SetMenuEntryText(); #endregion }
protected void OnCancel(object sender, PlayerIndexEventArgs e) { OnCancel(e.PlayerIndex); }
void ControlsGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { ScreenManager.AddScreen(new ControlScreen(), e.PlayerIndex); }
void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e) { ScreenManager.Game.Exit(); }
void OptionsGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { ScreenManager.AddScreen(new OptionsMenuScreen(playerTriggerSensitivity), e.PlayerIndex); }