//public LoadingStage(ResourceList res_list, ParentGame parentGame)
        //{
        //    ContMang = parentGame.Content;
        //    theList = res_list;
        //    MODEL_EFFECT = parentGame.objEffect;
        //    DEVICE = parentGame.device;
        //    Type = StageType.Loading;
        //    Tex2dLoadList = new Dictionary<String, bool>();
        //    ModelLoadList = new Dictionary<String, bool>();
        //    SetThreads();
        //   // LoadContent();
        //   // EndLoading();
        //}
        /// <summary>
        /// Previously, an old resourse list could be used and modified with new content, 
        /// however, I have changed it to create a new ContentManager for each load, and 
        /// consequently, a new resource list is required for each load... until i fix it.
        /// </summary>
        /// <param name="res_list"></param>
        /// <param name="parentGame"></param>
        /// <param name="initialLoad"></param>
        public LoadingStage(ResourceList res_list, ParentGame parentGame, bool initialLoad)
        {
            if (initialLoad)
                ContMang = parentGame.Content;
            else
                ContMang = new ContentManager(parentGame.Services, "Content");

            theList = res_list;
            MODEL_EFFECT = parentGame.objEffect;
            DEVICE = parentGame.device;

            InitialLoad = initialLoad;
            this.parentGame = parentGame;

            Type = StageType.Loading;

            Tex2dLoadList = new Dictionary<String, bool>();
            ModelLoadList = new Dictionary<String, bool>();

            SetThreads();

            // LoadContent();
            // EndLoading();
        }
        void LoadLevel(GameTime gameTime)
        {
            Game_State = GameState.MenuLoaded;
            LoadingComplete = false;
            Loading = false;

            if (Level_Loader != null)
            {
                Level_Loader.Stop();
            }

            if (loadWait > TimeSpan.FromSeconds(0.2d))
            {
                if (!LevelStat[LevelNum - 1].locked)
                {
                    LoadedResources = new ResourceList();
                    Level_Loader = new LevelLoader(this);
                    Level_Loader.LoadLevel(LevelNum);
                    Load_FrameCount = 0;
                    Game_State = GameState.LoadingLevel;
                    Loading = true;
                    LoadingComplete = false;
                    loadWait = TimeSpan.Zero;

                    if (loadingLevel != null)
                        if (loadingLevel.IsActive)
                            loadingLevel.ExitScreen();

                    loadingLevel = new LoadingGameScreen(Level_Loader);
                    loadingLevel.ScreenManager = screenManager;
                }
            }
            else
                loadWait += gameTime.ElapsedGameTime;
        }
 public LevelLoader(ParentGame parentGame)
 {
     this.parentGame = parentGame;
     Load_Stage = parentGame.Loading_Stage;
     this.LoadedResources = parentGame.LoadedResources;
 }
        protected override void LoadContent()
        {
            InitializeRenderTargets();

            LoadLoadingAnimation();

            objEffect = Content.Load<Effect>("Effect\\MyVSM");

               // How to use:
            /// Added TimerRuler instance to Game.Components and call timerRuler.StartFrame in
            /// top of the Game.Update method.
            ///

            Menu_Load_List = new MenuLoadList();
            MenuVariables = new MenuResources();
            MenuObjects = new ResourceList();
            LoadedResources = new ResourceList();

            GetLevelStats();

            MenuLoadMenu();
            //Loading stage loads content in background
            //Need to check its progress, display "loading",
            //and continue after completion
        }