예제 #1
0
        public void AddScreen(GameScreen screen)
        {
            Debug.WriteLine("ScreenManager:AddScreen:" + screen.GetType().ToString());
            screen.ScreenManager = this;

            if (isInitialised)
                screen.LoadContent();

            activeScreens.Add(screen);
        }
예제 #2
0
        // Remove instantly
        public void RemoveScreen(GameScreen screen)
        {
            Debug.WriteLine("ScreenManager:RemoveScreen:" + screen.GetType().ToString());
            if (isInitialised)
                screen.UnloadContent();

            activeScreens.Remove(screen);
            updateScreens.Remove(screen);
        }