Esempio n. 1
0
 private LoadingScreen(ScreenManager screenManager, bool loadingIsSlow,
                       GameScreen[] screensToLoad)
 {
     this.loadingIsSlow = loadingIsSlow;
     this.screensToLoad = screensToLoad;
     TransitionOnTime = TimeSpan.FromSeconds(0.5);
 }
Esempio n. 2
0
        public void AddScreen(GameScreen screen, PlayerIndex? controllingPlayer)
        {
            screen.ControllingPlayer = controllingPlayer;
            screen.ScreenManager = this;
            screen.IsExiting = false;

            // If we have a graphics device, tell the screen to load content.
            if (isInitialized)
            {
                screen.Activate(false);
            }

            screens.Add(screen);
        }
Esempio n. 3
0
        public void RemoveScreen(GameScreen screen)
        {
            // If we have a graphics device, tell the screen to unload content.
            if (isInitialized)
            {
                screen.Unload();
            }

            screens.Remove(screen);
            tempScreensList.Remove(screen);
        }