Example #1
0
        public Game1()
        {
            Content.RootDirectory = "Content";

            graphics = new GraphicsDeviceManager (this);
            graphics.PreferredBackBufferWidth = bufferWidth;
            graphics.PreferredBackBufferHeight = bufferHeight;
            graphics.IsFullScreen = false;

            screenManager = new ScreenManager (this);

            Components.Add (screenManager);

            screenManager.AddScreen (new BackgroundScreen (), null);
            screenManager.AddScreen (new MainMenuScreen (), null);
        }
Example #2
0
        public static void Load(ScreenManager screenManager, bool loadingIsSlow, PlayerIndex? controllingPlayer,
		                         params GameScreen[] screensToLoad)
        {
            foreach (GameScreen screen in screenManager.GetScreens ())
                screen.ExitScreen ();

            LoadingScreen loadingScreen = new LoadingScreen (screenManager, loadingIsSlow, screensToLoad);
            screenManager.AddScreen (loadingScreen, controllingPlayer);
        }