private static void InPool(LoaderNode node) { if (node == null) { return; } node.Reset(); InitPool(); m_Pool.Store(node); }
public static LoaderNode Create(string fileName, ResourceCacheType cacheType, System.Type resType, bool isAsync, System.Delegate callBack = null) { InitPool(); LoaderNode ret = m_Pool.GetObject(); ret.m_ResFileName = fileName; ret.m_ResCacheType = cacheType; ret.m_CallBack = callBack; ret.m_ResType = resType; ret.m_IsAsync = isAsync; return(ret); }
public void AddNode(string fileName, ResourceCacheType cacheType, System.Type resType, bool isAsync, System.Delegate callBack = null) { AsyncLoadKey key = new AsyncLoadKey(); key.fileName = fileName; key.type = resType; if (m_LoadingHash.Contains(key)) { return; } LoaderNode node = LoaderNode.Create(fileName, cacheType, resType, isAsync, callBack); if (node == null) { return; } m_LoadingHash.Add(key); m_LoadList.AddLast(node.LinkNode); }