// 资源加载完成,触发下一次加载 protected void onMsgRouteResLoad(MsgRouteBase msg) { DataLoadItem loadItem = (msg as LoadedWebResMR).m_task as DataLoadItem; loadItem.handleResult(); }
protected LoadItem createLoadItem(LoadParam param) { LoadItem loadItem = findLoadItemFormPool(param.m_resPackType); if (ResPackType.eResourcesType == param.m_resPackType) // 默认 Bundle 中资源 { if (loadItem == null) { loadItem = new ResourceLoadItem(); } } else if (ResPackType.eBundleType == param.m_resPackType) // Bundle 打包模式 { if (loadItem == null) { loadItem = new BundleLoadItem(); } } else if (ResPackType.eLevelType == param.m_resPackType) { if (loadItem == null) { loadItem = new LevelLoadItem(); } (loadItem as LevelLoadItem).levelName = param.lvlName; } else if (ResPackType.eDataType == param.m_resPackType) { if (loadItem == null) { loadItem = new DataLoadItem(); } (loadItem as DataLoadItem).m_version = param.m_version; } else if (ResPackType.eUnPakType == param.m_resPackType || ResPackType.eUnPakLevelType == param.m_resPackType) { if (loadItem == null) { loadItem = new ABUnPakLoadItem(); } } else if (ResPackType.ePakType == param.m_resPackType || ResPackType.ePakLevelType == param.m_resPackType) { if (loadItem == null) { loadItem = new ABPakLoadItem(); } } loadItem.resPackType = param.m_resPackType; loadItem.resLoadType = param.m_resLoadType; loadItem.path = param.m_path; loadItem.pathNoExt = param.m_pathNoExt; loadItem.extName = param.extName; loadItem.loadNeedCoroutine = param.m_loadNeedCoroutine; loadItem.nonRefCountResLoadResultNotify.loadResEventDispatch.addEventHandle(onLoadEventHandle); return loadItem; }
protected LoadItem createLoadItem(LoadParam param) { LoadItem loadItem = findLoadItemFormPool(param.m_resPackType); if (ResPackType.eResourcesType == param.m_resPackType) // 默认 Bundle 中资源 { if (loadItem == null) { loadItem = new ResourceLoadItem(); } } else if (ResPackType.eBundleType == param.m_resPackType) // Bundle 打包模式 { if (loadItem == null) { loadItem = new BundleLoadItem(); } } else if (ResPackType.eLevelType == param.m_resPackType) { if (loadItem == null) { loadItem = new LevelLoadItem(); } (loadItem as LevelLoadItem).levelName = param.lvlName; } else if (ResPackType.eDataType == param.m_resPackType) { if (loadItem == null) { loadItem = new DataLoadItem(); } (loadItem as DataLoadItem).m_version = param.m_version; } else if (ResPackType.eUnPakType == param.m_resPackType || ResPackType.eUnPakLevelType == param.m_resPackType) { if (loadItem == null) { loadItem = new ABUnPakLoadItem(); } } else if (ResPackType.ePakType == param.m_resPackType || ResPackType.ePakLevelType == param.m_resPackType) { if (loadItem == null) { loadItem = new ABPakLoadItem(); } } loadItem.resPackType = param.m_resPackType; loadItem.resLoadType = param.m_resLoadType; loadItem.path = param.m_path; loadItem.pathNoExt = param.m_pathNoExt; loadItem.extName = param.extName; loadItem.loadNeedCoroutine = param.m_loadNeedCoroutine; loadItem.nonRefCountResLoadResultNotify.loadResEventDispatch.addEventHandle(onLoadEventHandle); return(loadItem); }