示例#1
0
        public void displayEpicFail()
        {
            const string message = "EPIC FAIL!!!!!1";

            CustomMessageBoxScreen confirmQuitMessageBox = new CustomMessageBoxScreen(message, false);

            confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted;

            ScreenManager.AddScreen(confirmQuitMessageBox, ControllingPlayer);

            try
            {
                MediaPlayer.Stop();
                failSound.Play();
            }
            catch { }
        }
示例#2
0
        private void UpdateWinnerTile(GameTime gameTime)
        {
            foreach (WinnerTile winning in winnerTiles)
            {
                if (winning.BoundingRectangle.Intersects(PlatformerGame.Players[PlatformerGame.attacker_id].BoundingRectangle))
                {
                    const string message = "WINNER!";

                    CustomMessageBoxScreen confirmQuitMessageBox = new CustomMessageBoxScreen(message, false);

                    confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted;

                    game.ScreenManager.AddScreen(confirmQuitMessageBox, game.ControllingPlayer);

                    try
                    {
                        MediaPlayer.Stop();
                        clearSound.Play();
                    }
                    catch { }
                }
            }
        }