Ejemplo n.º 1
0
        /// <summary>
        /// Activates the loading screen.
        /// </summary>
        public static void Load(ScreenManager screenManager, bool loadingIsSlow,
                                PlayerIndex? controllingPlayer,
                                params GameScreen[] screensToLoad)
        {
            // Tell all the current screens to transition off.
            foreach (GameScreen screen in screenManager.GetScreens())
            {
                if (!screen.SaveScreen)
                    screen.ExitScreen();
            }
            // Create and activate the loading screen.
            LoadingScreen loadingScreen = new LoadingScreen(screenManager,
                                                            loadingIsSlow,
                                                            screensToLoad);

            screenManager.AddScreen(loadingScreen, controllingPlayer);
        }
Ejemplo n.º 2
0
        public static void ShowGameOver(ScreenManager screenManager, PlayerIndex? playerIndex)
        {
            if(gameOver == null)
                gameOver = new GameOverBox("You died!!");

            screenManager.AddScreen(gameOver, playerIndex);
        }
Ejemplo n.º 3
0
        public static void ShowArcadeTimeUp(ScreenManager screenManager, PlayerIndex? playerIndex, int score)
        {
            arcadeTimeUp = new GameOverBox("Time up!" + Environment.NewLine + "Score: " + score.ToString());

            screenManager.AddScreen(arcadeTimeUp, playerIndex);
        }
Ejemplo n.º 4
0
        public static void ShowLevelComplete(ScreenManager ScreenManager, PlayerIndex? ControllingPlayer, int score)
        {
            levelComplete = new LevelCompleteBox("Level Complete!" + Environment.NewLine + "Score: " + score.ToString());

            if(ScreenManager.GetScreens().Where(x=>x.GetType() == typeof(LevelCompleteBox)).FirstOrDefault() == null)
                ScreenManager.AddScreen(levelComplete, ControllingPlayer);
        }