Exemplo n.º 1
0
        /// <summary>
        /// Removed the desired screen from the system
        /// </summary>
        /// <param name="screen">The screen we wish to remove</param>
        public void RemoveScreen(GameScreen screen)
        {
            //If the screen manager is initialized, unload the screen content.
            if (this.isInitialized)
            {
                screen.UnloadContent();
            }

            //Finally, remove the screen from both lists.
            screens.Remove(screen);
            screensToUpdate.Remove(screen);
        }