protected override void Initialize() { screenManager = new ScreenManager(this); this.Components.Add(screenManager); screenManager.AddScreen(new BackgroundScreen()); screenManager.AddScreen(new MainMenuScreen()); base.Initialize(); }
/// <summary> /// Activates the loading screen. /// </summary> public static void Load(ScreenManager screenManager, EventHandler<EventArgs> loadNextScreen, bool loadingIsSlow) { // Tell all the current screens to transition off. foreach (GameScreen screen in screenManager.GetScreens()) screen.ExitScreen(); // Create and activate the loading screen. LoadingScreen loadingScreen = new LoadingScreen(); loadingScreen.loadingIsSlow = loadingIsSlow; loadingScreen.loadNextScreen = loadNextScreen; screenManager.AddScreen(loadingScreen); }