Exemplo n.º 1
0
 public void LoadScreen(GameScreen gameScreen1, GameScreen gameScreen2)
 {
     LoadingScreen.Load(this, false, new GameScreen[] { gameScreen1, gameScreen2 });
 }
Exemplo 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 void RemoveScreen(GameScreen screen)
        {
            // If we have a graphics device, tell the screen to unload content.
            if (_isInitialized)
            {
                screen.UnloadScreenContent();
            }

            _screens.Remove(screen);
            _tempScreensList.Remove(screen);

#if WINDOWS_PHONE
            // if there is a screen still in the manager, update TouchPanel
            // to respond to gestures that screen is interested in.
            if (_screens.Count > 0)
            {
                TouchPanel.EnabledGestures = _screens[_screens.Count - 1].EnabledGestures;
            }
#endif
        }
Exemplo n.º 3
0
        public void AddScreen(GameScreen screen, Delay delay)
        {
            Ensure.NotNull(screen);
            Ensure.NotNull(delay);

            _screensToBeAddedWithDelay.Add(Pair.Create(delay, screen));
        }
Exemplo n.º 4
0
 // feels a bit meh
 public void LoadScreen(GameScreen gameScreen)
 {
     LoadingScreen.Load(this, false, gameScreen);
 }
Exemplo n.º 5
0
        /// <summary>
        /// Adds a new screen to the screen manager.
        /// </summary>
        public void AddScreen(GameScreen screen)
        {
            screen.ScreenManager = this;
            screen.IsExiting = false;
            _screens.Add(screen);

#if WINDOWS_PHONE
            // update the TouchPanel to respond to gestures this screen is interested in
            TouchPanel.EnabledGestures = screen.EnabledGestures;
#endif

            // If we have a graphics device, tell the screen to load content.
            if (_isInitialized)
            {
#if WINDOWS
                screen.LoadScreenContent();
#elif WINDOWS_PHONE
                screen.LoadScreenContent(false);
#endif
            }
        }
Exemplo n.º 6
0
 public static void Draw(GraphicsContext graphicsContext, GameScreen gameScreen)
 {
     gameScreen.DrawScreen(graphicsContext);
 }
Exemplo n.º 7
0
 public static void Update(UpdateContext updateContext, GameScreen gameScreen)
 {
     gameScreen.UpdateScreen(updateContext, false, false);
 }
Exemplo n.º 8
0
 public static void LoadContent(GameScreen gameScreen)
 {
     gameScreen.LoadScreenContent();
 }
Exemplo n.º 9
0
 public static void LoadContent(GameScreen gameScreen, bool instancePreserved)
 {
     gameScreen.LoadScreenContent(instancePreserved);
 }