Manage the various screens.
Ejemplo n.º 1
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            screenManager = new ScreenManager();
            graphics.PreferredBackBufferWidth = 720;
        }
Ejemplo n.º 2
0
        public void RestartTest()
        {
            ScreenManager manager = new ScreenManager();
            GameScreen game = new GameScreen();
            MenuScreen menu = new MenuScreen();

            menu.Manager = manager;
            manager.Screens.Push(game);
            manager.Screens.Push(menu);
            menu.Restart();

            Assert.AreNotEqual(game, manager.Screens.Peek());
        }