Пример #1
0
        public void LoadLevel(int Number)
        {
            //GetLevelFromXML();

            GetLevelFromLevelCode(Number);

            if (Load_Stage != null)
            {

                //Load_Stage.backgroundThread.Abort();
                Load_Stage.EndLoading();

                //while (Load_Stage.backgroundThread.IsAlive)
                //{
                //    //wait?
                //}
                Load_Stage.SetThreads();
            }

            //Loaded = false;
            //LOADING = false;

            Load_Stage = new LoadingStage(LoadedResources, parentGame, false);

            // set level_load_list
            GetLoadList();

            List<String> resList = GetLevelTextures();
            Load_Stage.AddToTex2DList(resList);

            resList = GetLevelModels();
            Load_Stage.AddToModelList(resList);

            Load_Stage.LoadContent();
        }
Пример #2
0
 public LevelLoader(ParentGame parentGame)
 {
     this.parentGame = parentGame;
     Load_Stage = parentGame.Loading_Stage;
     this.LoadedResources = parentGame.LoadedResources;
 }
Пример #3
0
        void MenuLoadMenu()
        {
            Load_FrameCount = 0;
            Loading_Stage = new LoadingStage(MenuObjects, this, true);

            List<String> resList = MenuGetTextures();
            Loading_Stage.AddToTex2DList(resList);

            resList = MenuGetModels();
            Loading_Stage.AddToModelList(resList);

            Loading_Stage.LoadContent();
        }