/// <summary> /// Activates the loading screen and loads up the next screen with the provided callback. /// </summary> public static void Load(ScreenManager screenManager, EventHandler<EventArgs> loadNextScreen) { // 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.loadNextScreen = loadNextScreen; screenManager.AddScreen(loadingScreen); }
public TerrainExplorer() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; graphics.PreferredBackBufferWidth = 1024; graphics.PreferredBackBufferHeight = 768; graphics.MinimumPixelShaderProfile = ShaderProfile.PS_3_0; graphics.SynchronizeWithVerticalRetrace = true; screenManager = new ScreenManager(this); screenManager.AddScreen(new GameplayScreen()); Components.Add(screenManager); frameRateCounter = new FrameRateCounter(this); Components.Add(frameRateCounter); }