public void LoadScreen(GameScreen gameScreen1, GameScreen gameScreen2) { LoadingScreen.Load(this, false, new GameScreen[] { gameScreen1, gameScreen2 }); }
/// <summary> /// Removes a screen from the screen manager. You should normally /// use GameScreen.ExitScreen instead of calling this directly, so /// the screen can gradually transition off rather than just being /// instantly removed. /// </summary> public void RemoveScreen(GameScreen screen) { // If we have a graphics device, tell the screen to unload content. if (_isInitialized) { screen.UnloadScreenContent(); } _screens.Remove(screen); _tempScreensList.Remove(screen); #if WINDOWS_PHONE // if there is a screen still in the manager, update TouchPanel // to respond to gestures that screen is interested in. if (_screens.Count > 0) { TouchPanel.EnabledGestures = _screens[_screens.Count - 1].EnabledGestures; } #endif }
public void AddScreen(GameScreen screen, Delay delay) { Ensure.NotNull(screen); Ensure.NotNull(delay); _screensToBeAddedWithDelay.Add(Pair.Create(delay, screen)); }
// feels a bit meh public void LoadScreen(GameScreen gameScreen) { LoadingScreen.Load(this, false, gameScreen); }
/// <summary> /// Adds a new screen to the screen manager. /// </summary> public void AddScreen(GameScreen screen) { screen.ScreenManager = this; screen.IsExiting = false; _screens.Add(screen); #if WINDOWS_PHONE // update the TouchPanel to respond to gestures this screen is interested in TouchPanel.EnabledGestures = screen.EnabledGestures; #endif // If we have a graphics device, tell the screen to load content. if (_isInitialized) { #if WINDOWS screen.LoadScreenContent(); #elif WINDOWS_PHONE screen.LoadScreenContent(false); #endif } }
public static void Draw(GraphicsContext graphicsContext, GameScreen gameScreen) { gameScreen.DrawScreen(graphicsContext); }
public static void Update(UpdateContext updateContext, GameScreen gameScreen) { gameScreen.UpdateScreen(updateContext, false, false); }
public static void LoadContent(GameScreen gameScreen) { gameScreen.LoadScreenContent(); }
public static void LoadContent(GameScreen gameScreen, bool instancePreserved) { gameScreen.LoadScreenContent(instancePreserved); }