/// <summary> /// 加载主资源 /// </summary> public void LoadMainAsset(AssetCategory assetCategory, string assetFullName, BaseAction <ResourceEntity> onComplete = null) { MainAssetLoaderRoutine routine = GameEntry.Pool.DequeueClassObject <MainAssetLoaderRoutine>(); routine.Load(assetCategory, assetFullName, (ResourceEntity resEntity) => { if (onComplete != null) { onComplete(resEntity); } }); }
/// <summary> /// 加载依赖资源 /// </summary> private void LoadDependsAsset() { List <AssetDependsEntity> lst = m_CurrAssetEntity.DependsAssetList; if (lst != null) { int len = lst.Count; m_NeedLoadAssetDependCount = len; for (int i = 0; i < len; i++) { AssetDependsEntity entity = lst[i]; MainAssetLoaderRoutine routine = GameEntry.Pool.DequeueClassObject <MainAssetLoaderRoutine>(); routine.Load(entity.Category, entity.AssetFullName, OnLoadDependsAssetComplete); } } else { LoadMainAsset(); } }