/// <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); }
public static void ShowGameOver(ScreenManager screenManager, PlayerIndex? playerIndex) { if(gameOver == null) gameOver = new GameOverBox("You died!!"); screenManager.AddScreen(gameOver, playerIndex); }
public static void ShowArcadeTimeUp(ScreenManager screenManager, PlayerIndex? playerIndex, int score) { arcadeTimeUp = new GameOverBox("Time up!" + Environment.NewLine + "Score: " + score.ToString()); screenManager.AddScreen(arcadeTimeUp, playerIndex); }
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); }