public void Load(string level, IState <string> state) { baseState = state; Dictionary <string, string> xmls = new Dictionary <string, string>(); switch (level) { case AppConst.ResourcesLevel_RootLevel: foreach (FileInfo file in new DirectoryInfo(AppConst.Path[level]).GetFiles("*.xml")) { xmls.Add(file.Name.Replace(".xml", ""), file.FullName); } break; case AppConst.ResourcesLevel_GeneralLevel: foreach (var kv in FrameManager.GetData(GetAllValue, AppConst.ResourcesLevel_RootLevel, "AppData", "Load", "Data") as Dictionary <string, string> ) { xmls.Add(kv.Key, AppConst.Path[AppConst.ResourcesLevel_GeneralLevel] + kv.Value); } break; } foreach (var kv in xmls) { waitForLoadXmlState.ExciteState(kv.Value); RunTimeTools.Instence.StartCoroutine(CoroutineLoadXml(kv.Key, kv.Value)); } waitForLoadXmlState.AddAlready(); }