Exemple #1
0
        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));
        }
Exemple #2
0
        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));
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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;
 }
Exemple #6
0
 public AssetBundleResource(ResourceManagerImpl mgr, int nID) : base(mgr, nID)
 {
     m_eType = EResourceType.EResourceType_AssetBundle;
 }
Exemple #7
0
 public IResource(ResourceManagerImpl mgr, int nID)
     : base(nID)
 {
     m_Mgr = mgr;
 }