public void Dispose() { mainGameScreen = null; debugScreen = null; options = null; titleScreen = null; }
public ScreenManager() { splashScreen = new SplashIntroScreen(); mainGameScreen = new MainGameScreen(); titleScreen = new TitleScreen(); options = new OptionsScreen(); debugScreen = new DebugInfo(); MainGame.CustomContentManager = new Graphics.ContentManager(); CurrentScreen = GameScreens.SPLASH; LoadContent(); }
public void PushScreen(GameScreens screen, int worldLoadIndex = -1) { if (screen == GameScreens.MAIN) titleScreen.AdvanceSplash(); if(screen == GameScreens.OPTIONS) options = new OptionsScreen(); if (screen == GameScreens.GAME) { mainGameScreen = new MainGameScreen(worldLoadIndex); Thread.Sleep(200); } CurrentScreen = screen; }