Esempio n. 1
0
 private static void InPool(LoaderNode node)
 {
     if (node == null)
     {
         return;
     }
     node.Reset();
     InitPool();
     m_Pool.Store(node);
 }
Esempio n. 2
0
    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);
    }
Esempio n. 3
0
    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);
    }