/// <summary> /// Activates the loading screen. /// </summary> public static void Load(ScreenManager screenManager, GameScreen screenToLoad) { // 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(screenManager, screenToLoad); screenManager.AddScreen(loadingScreen); }
/// <summary> /// Event handler for when the Start Game entry is selected. /// </summary> private void StartGameEntrySelected(object sender, EventArgs e) { //If start game is selected, load the GamePlayScreen using the LoadingScreen. LoadingScreen.Load(ScreenManager, new GamePlayScreen()); }