public void AddScreen(GameScreen screen) { Debug.WriteLine("ScreenManager:AddScreen:" + screen.GetType().ToString()); screen.ScreenManager = this; if (isInitialised) screen.LoadContent(); activeScreens.Add(screen); }
// Remove instantly public void RemoveScreen(GameScreen screen) { Debug.WriteLine("ScreenManager:RemoveScreen:" + screen.GetType().ToString()); if (isInitialised) screen.UnloadContent(); activeScreens.Remove(screen); updateScreens.Remove(screen); }