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

            if (isInitialized)
            {
                screen.LoadContent();
            }

            screens.Add(screen);
        }
Exemplo n.º 3
0
        public void RemoveScreen(GameScreen screen)
        {
            if (isInitialized)
            {
                screen.UnloadContent();
            }

            screens.Remove(screen);
            screensToUpdate.Remove(screen);
        }
Exemplo n.º 4
0
 // insert a screen onto the stack so that it becomes
 // the screen that will be displayed.
 public void Push(Screens.GameScreen screen)
 {
     screens.Push(screen);
 }