//添加一个物理文件到加载队列 public void AddPhyFile(string phyFile, PhyResouce.EPhyResType phyResType) { if (ResourceManager.Instance.GetPhyRes(phyFile) != null) { return; } if (phyReqDic.ContainsKey(phyFile) == true) { return; } PhyLoadRequest loadReq = new PhyLoadRequest(); loadReq.resPath = phyFile; loadReq.resType = phyResType; phyReqDic.Add(phyFile, loadReq); }
// public void LoadImpl(string path, PhyResouce.EPhyResType type, OnResLoaded onLoaded = null, OnResLoadError onError = null) { //GameDefine.GameMethod.DebugError("load " + path); if (phyResDic.ContainsKey(path) == true) { return; } if (loadImplDic.ContainsKey(path) == true) { return; } LoadImplement l = new LoadImplement(); l.phyResType = type; l.onResLoaded = onLoaded; l.onResLoadError = onError; l.resPath = path; l.start(); loadImplDic.Add(path, l); }