Esempio n. 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 private BriefingScreen(int levelNumber, GameScreen[] screensToLoad)
 {
     TransitionOnTime = TimeSpan.FromSeconds(0.5f);
     TransitionOffTime = TimeSpan.FromSeconds(0.5f);
     _currentLevelNumber = levelNumber;
     _screensToLoad = screensToLoad;
 }
Esempio n. 2
0
        /// <summary>
        /// Removes a screen from the screen manager. You should normally
        /// use GameScreen.ExitScreen instead of calling this directly, so
        /// the screen can gradually transition off rather than just being
        /// instantly removed.
        /// </summary>
        public static void RemoveScreen(GameScreen screen)
        {
            // If we have a graphics device, tell the screen to unload content.

            if (_initialized)
            {
                screen.UnloadContent();
            }

            _screens.Remove(screen);
            _screensToUpdate.Remove(screen);
        }
Esempio n. 3
0
 /// <summary>
 /// Adds a new screen to the screen manager.
 /// </summary>
 public static void AddScreen(GameScreen screen)
 {
     // If we have a graphics device, tell the screen to load content.
     _screens.Add(screen);
     if (_initialized)
     {
         screen.LoadContent();
     }
 }