public void LoadScreen(IGameScreen screen) { _activeScreen?.UnloadContent(); _activeScreen?.Dispose(); screen.ScreenManager = this; screen.Initialize(); screen.LoadContent(); _activeScreen = screen; }
private void TransitionScene() { _activeScene?.UnloadContent(); GC.Collect(); _activeScene = _nextScene; _nextScene = null; _activeScene?.Initialize(); }
private void Dismiss(IGameScreen gameScreen) { gameScreen.UnloadContent(); gameScreen.ScreenManager = null; }