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(); }
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(); }