UnloadContent() public method

Unload content for the screen.
public UnloadContent ( ) : void
return void
Esempio n. 1
0
        /// <summary>
        /// Removes a screen from the screen manager. You should normally
        /// use <see cref="GameScreen"/>.ExitScreen instead of calling this directly, so
        /// the screen can gradually transition off rather than just being
        /// instantly removed.
        /// </summary>
        public void RemoveScreen(GameScreen screen)
        {
            screen.UnloadContent();
            
            _screens.Remove(screen);
            _screensToUpdate.Remove(screen);

            screen.Dispose();
        }