}//end Load /// <summary> /// 加载资源 /// </summary> /// <param name="resPath"></param> /// <returns></returns> public ResLoader LoadFromResource(string resPath, bool loadAll = false) { ResLoader ret = null; if (sMap.TryGetValue(resPath, out ret)) { return(ret); } else { ret = ResLoader.Get(); sMap.Add(resPath, ret); ret.ResPath = resPath; ret.LoadFromResource(); if (loadAll) { ret.LoadAll(); } } return(ret); }//end Load
}//end Load /// <summary> /// 加载展示模型和对应的特效资源 /// </summary> /// <param name="resPath"></param> /// <returns></returns> public ResLoader LoadShowHeroResourcesAsync(string resPath, bool loadAll = false) { ResLoader ret = null; if (!resPath.Filled()) { Logger.Log("resPath no Filled"); return(ret); } else { #if USE_ASSETBUNDLE ret = ResLoader.Get(); ret.ResPath = resPath; ret.bIsShowHeroRes = true; //需要设置这个标志,表示是展示英雄(选角)的资源 if (File.Exists(ret.RealPath)) { ret.LoadFromBundleForHero(); } else { Logger.Log("LoadFromResource:" + resPath); ret.LoadFromResourceAsync(); if (loadAll) { ret.LoadAll(); } } #else //ret = LoadFromResourceForShowHeroAsync(resPath, loadAll); #endif } return(ret); }//end Load