private void PreloadFX(ResWeight.ResType type) { if (ResWeight.IsLoadFinished(type)) { this.JustLoadNextResource(ResWeight.ResType.none); return; } using (HashSet <int> .Enumerator enumerator = LoadingRes.m_load_fxIds.GetEnumerator()) { while (enumerator.MoveNext()) { int current = enumerator.get_Current(); Fx fx = DataReader <Fx> .Get(current); if (fx == null) { this.LoadSuccessWithCheck(type); } else { AssetManager.LoadAssetWithPool(fx.path, delegate(bool isSuccess) { this.LoadSuccessWithCheck(type); }); } } } }
private void LoadSuccessWithCheck(ResWeight.ResType type) { Loading.Instance.PreloadFinish(ResWeight.GetWeight(type)); ResWeight.LoadSuccess(type); if (ResWeight.IsLoadFinished(type)) { this.JustLoadNextResource(type); } }
private void PreloadSpines(ResWeight.ResType type) { if (ResWeight.IsLoadFinished(type)) { this.JustLoadNextResource(ResWeight.ResType.none); return; } using (HashSet <string> .Enumerator enumerator = LoadingRes.m_load_spines.GetEnumerator()) { while (enumerator.MoveNext()) { string current = enumerator.get_Current(); AssetManager.AssetOfSpineManager.LoadAssetWithPool(FileSystem.GetPathOfSpine(current), delegate(bool isSuccess) { this.LoadSuccessWithCheck(type); }); } } }
private void PreloadUiAtlas(ResWeight.ResType type) { if (ResWeight.IsLoadFinished(type)) { this.JustLoadNextResource(ResWeight.ResType.none); return; } using (HashSet <string> .Enumerator enumerator = LoadingRes.m_load_uiatlas.GetEnumerator()) { while (enumerator.MoveNext()) { string current = enumerator.get_Current(); AssetManager.AssetOfTPManager.LoadAtlas(current, delegate(bool isSuccess) { this.LoadSuccessWithCheck(type); }); } } }