public AssetBundleResource GetAssetBundle(ref string strResourceName, LoadFinishDelegate callBack, object custumParam = null, TaskPriority ePriority = TaskPriority.TaskPriority_Immediate, IResource.ResourceCacheLevel rcl = IResource.ResourceCacheLevel.ResourceCacheLevel_1) { ResourceManagerImpl mgr = GetMgr(IResource.EResourceType.EResourceType_AssetBundle); return((AssetBundleResource)mgr.GetResource(IResource.EResourceType.EResourceType_AssetBundle, ref strResourceName, callBack, custumParam, rcl, ePriority)); }
public TextureResource GetTexture(ref string strResourceName, LoadFinishDelegate callBack, object custumParam = null, TaskPriority ePriority = TaskPriority.TaskPriority_Normal, IResource.ResourceCacheLevel rcl = IResource.ResourceCacheLevel.ResourceCacheLevel_1) { ResourceManagerImpl mgr = GetMgr(IResource.EResourceType.EResourceType_Texture); return((TextureResource)mgr.GetResource(IResource.EResourceType.EResourceType_Texture, ref strResourceName, callBack, custumParam, rcl, ePriority)); }
ResourceManagerImpl GetMgr(IResource.EResourceType type) { ResourceManagerImpl mgr = null; if (m_dicResourcesImpl.TryGetValue(type, out mgr)) { return(mgr); } mgr = new ResourceManagerImpl(); m_dicResourcesImpl.Add(type, mgr); return(mgr); }
public IResource CreateResource(IResource.EResourceType eType, ResourceManagerImpl mgr, TaskPriority ePriority = TaskPriority.TaskPriority_Normal) { IResource res = null; s_ResouceIDSeed++; switch (eType) { case IResource.EResourceType.EResourceType_AssetBundle: res = new AssetBundleResource(GetMgr(eType), s_ResouceIDSeed); break; case IResource.EResourceType.EResourceType_Texture: res = new TextureResource(GetMgr(eType), s_ResouceIDSeed); break; } res.SetPriority(ePriority); return(res); }
public TextureResource(ResourceManagerImpl mgr, int nID) : base(mgr, nID) { m_eType = EResourceType.EResourceType_Texture; }
public AssetBundleResource(ResourceManagerImpl mgr, int nID) : base(mgr, nID) { m_eType = EResourceType.EResourceType_AssetBundle; }
public IResource(ResourceManagerImpl mgr, int nID) : base(nID) { m_Mgr = mgr; }