Esempio n. 1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            screenManager.SpriteBatch = spriteBatch;
            screenManager.GameContainer.ContentManager = screenManager.Game.Content;
            screenManager.GameContainer.GraphicsDevice = screenManager.GraphicsDevice;
            screenManager.GameContainer.SpriteBatch    = spriteBatch;

            //windowManager.SpriteBatch = spriteBatch;

            //screenManager.WindowManager = windowManager;

            FontManager.LoadContent();

            if (!GameConfig.loadConfig())
            {
                InputManager.YesExit = true;
            }

            NewLoadingScreen.Load(screenManager, false, new StartScreen());
            //NewLoadingScreen.Load(screenManager,true,new WorldScreen());
            //screenManager.addScreen (new StartScreen());
#if DEBUG
            Console.Out.WriteLine("GAME LOADED...");
#endif
            base.LoadContent();
        }
Esempio n. 2
0
        public static void Load(ScreenManager manager, bool isLoadingSlow, Screen screen)
        {
            screen.ScreenManager = manager;
            screen.ScreenManager.Game.Content = manager.Game.Content;
            screen.ScreenState = ScreenState.Inactive;

            if (isLoadingSlow)
            {
                NewLoadingScreen loadingScreen = new NewLoadingScreen(manager, screen);

                manager.addScreen(loadingScreen);
            }
            else
            {
                manager.addScreen(screen);
            }
        }