/// <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()) screen.ExitScreen(); // Create and activate the loading screen. VictoryScreen loadingScreen = new VictoryScreen(screenManager, screensToLoad); screenManager.AddScreen(new BackgroundScreen(), controllingPlayer); screenManager.AddScreen(loadingScreen, controllingPlayer); }
/// <summary> /// Activates the loading screen. /// </summary> public static void Load(ScreenManager screenManager, bool loadingIsSlow, PlayerIndex? controllingPlayer, params GameScreen[] screensToLoad) { bool oneBackground = false; foreach (GameScreen screen in screenManager.GetScreens()) { if(screen is MainMenuScreen) screen.ExitScreen(); if (screen is BackgroundScreen && !oneBackground) oneBackground = true; else if (screen is BackgroundScreen && oneBackground) screen.ExitScreen(); } GameResources.game = screenManager.Game; //screenManager.AddScreen(); screenManager.AddScreen(new GameLoadScreen(screenManager, screensToLoad), controllingPlayer); }