public static IRes Create(string name, short assetType) { switch (assetType) { case eResType.kAssetBundle: return(AssetBundleRes.Allocate(name)); case eResType.kABAsset: return(AssetRes.Allocate(name)); case eResType.kABScene: return(SceneRes.Allocate(name)); case eResType.kInternal: return(InternalRes.Allocate(name)); case eResType.kNetImageRes: return(NetImageRes.Allocate(name)); case eResType.kHotUpdateRes: return(HotUpdateRes.Allocate(name)); default: Log.e("Invalid assetType :" + assetType); return(null); } }
public static NetImageRes Allocate(string name) { NetImageRes res = ObjectPool <NetImageRes> .S.Allocate(); if (res != null) { res.name = name; res.SetUrl(name.Substring(8)); } return(res); }