Example #1
0
 void unlockgameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     if (Guide.IsTrialMode == true &&
         PlayerIndexExtensions.CanBuyGame(e.PlayerIndex)
         )
     {
         Guide.ShowMarketplace(e.PlayerIndex);
     }
     else if (Guide.IsTrialMode)
     {
         MessageBoxScreen purchaseMessageBox;
         purchaseMessageBox            = new MessageBoxScreen("Please sign into an Xbox Live enabled profile that can purchase content.\nA button = Choose an Account\nB button = Cancel", false);
         purchaseMessageBox.Accepted  += purchaseMessageBoxAccepted;
         purchaseMessageBox.Cancelled += purchaseMessageBoxCancelled;
         ScreenManager.AddScreen(purchaseMessageBox, e.PlayerIndex);
     }
 }
Example #2
0
        void multiplayerMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            if (Guide.IsTrialMode == true &&
                PlayerIndexExtensions.CanBuyGame(e.PlayerIndex)
                )
            {
                Guide.ShowMarketplace(e.PlayerIndex);
            }
            if (Guide.IsTrialMode)
            {
                MessageBoxScreen purchaseMessageBox;
                purchaseMessageBox            = new MessageBoxScreen("Multiplayer gameplay is not available in the\ntrial version. Please purchase the game!\nA button = Okay", false);
                purchaseMessageBox.Accepted  += purchaseMessageBoxCancelled;
                purchaseMessageBox.Cancelled += purchaseMessageBoxCancelled;
                ScreenManager.AddScreen(purchaseMessageBox, e.PlayerIndex);
            }
            if (Guide.IsTrialMode == false)
            {
                BackgroundScreen.player1isplaying = false;
                BackgroundScreen.player2isplaying = false;
                BackgroundScreen.player3isplaying = false;
                BackgroundScreen.player4isplaying = false;

                Global_Variables.playerWhoBeganGame = e.PlayerIndex;
                switch (e.PlayerIndex)
                {
                case PlayerIndex.One:
                    Global_Variables.playerWhoBeganGameZeroIndexedInt = 0;
                    break;

                case PlayerIndex.Two:
                    Global_Variables.playerWhoBeganGameZeroIndexedInt = 1;
                    break;

                case PlayerIndex.Three:
                    Global_Variables.playerWhoBeganGameZeroIndexedInt = 2;
                    break;

                case PlayerIndex.Four:
                    Global_Variables.playerWhoBeganGameZeroIndexedInt = 3;
                    break;
                }
                BackgroundScreen.playerwhoselectedplay = e.PlayerIndex;
                if (BackgroundScreen.playerwhoselectedplay == PlayerIndex.One)
                {
                    BackgroundScreen.player1isplaying = true;
                }
                if (BackgroundScreen.playerwhoselectedplay == PlayerIndex.Two)
                {
                    BackgroundScreen.player2isplaying = true;
                }
                if (BackgroundScreen.playerwhoselectedplay == PlayerIndex.Three)
                {
                    BackgroundScreen.player3isplaying = true;
                }
                if (BackgroundScreen.playerwhoselectedplay == PlayerIndex.Four)
                {
                    BackgroundScreen.player4isplaying = true;
                }


                Guide.ShowSignIn(4, false);


                LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                                   new Black(null));
            }
        }