public static void Initialize(PathData pathData) { cacheData = pathData; InitializeFilter(); InitializeResourceList(); if (resourceOrderDic == null) { resourceOrderDic = new Dictionary <string, Resource>(); } else { resourceOrderDic.Clear(); } if (resourceDicForCombine == null) { resourceDicForCombine = new Dictionary <string, Resource>(); } else { resourceDicForCombine.Clear(); } IndependentFilter = null; preFilter = null; }
private static void InitializeSubResList() { if (subResourceList == null) { subResourceList = new List <Resource>(); } else { subResourceList.Clear(); } for (int i = 0; i < fullResourceList.Count; i++) { Resource res = fullResourceList[i]; if (subFilter == null) { subFilter = new ResourceFilter(cacheData.subResFilter); } if (subFilter.IsPassed(res.RelatePath)) { subResourceList.Add(res); } } }
private static void InitializeTrippleZipResList() { if (firstResourceList == null) { firstResourceList = new List <Resource>(); } else { firstResourceList.Clear(); } if (secondResourceList == null) { secondResourceList = new List <Resource>(); } else { secondResourceList.Clear(); } if (specialResourceList == null) { specialResourceList = new List <Resource>(); } else { specialResourceList.Clear(); } for (int i = 0; i < subResourceList.Count; i++) { Resource res = subResourceList[i]; if (firstFilter == null) { firstFilter = new ResourceFilter(cacheData.firstResFilter); } if (firstFilter.IsPassed(res.RelatePath)) { if (specialFilter == null) { specialFilter = new ResourceFilter(cacheData.specialResFilter); } if (specialFilter.IsPassed(res.RelatePath)) { specialResourceList.Add(res); } else { firstResourceList.Add(res); } } else { secondResourceList.Add(res); } } }
public static ResourceOrderType GetResourceOrderType(string relatePath) { if (string.IsNullOrEmpty(relatePath)) { return(ResourceOrderType.None); } if (preFilter == null) { preFilter = new ResourceFilter(cacheData.preDownloadFilter); } if (preFilter.IsPassed(relatePath)) { return(ResourceOrderType.Important); } else { return(ResourceOrderType.Ordinary); } }
public static ResourceType GetResourceType(string relatePath) { if (string.IsNullOrEmpty(relatePath)) { return(ResourceType.None); } if (IndependentFilter == null) { IndependentFilter = new ResourceFilter(cacheData.independentResFilter); } if (IndependentFilter.IsPassed(relatePath)) { return(ResourceType.Independent); } else { return(ResourceType.Common); } }
private static void InitializeSpecialResourceFilter() { specialFilter = new ResourceFilter(cacheData.specialResFilter); }
private static void InitializeFirstResourceFilter() { firstFilter = new ResourceFilter(cacheData.firstResFilter); }
private static void InitializeSubResourceFilter() { subFilter = new ResourceFilter(cacheData.subResFilter); }