public void SetScreen(Screen newScreen) { if (newScreen == null) return; // Dispose old screen if (currentScreen != null) currentScreen.Dispose(); // init new screen currentScreen = newScreen; newScreen.SetGame(this); newScreen.SetGraphics(GraphicsDevice); currentScreen.Init(); }
public void SetScreen(Screen newScreen) { game.SetScreen(newScreen); }