Ejemplo n.º 1
0
    public void CheckLoadQueue(LoadItem loadItem)
    {
        IPool pool;

        if (mPools.TryGetValue(loadItem.id, out pool))
        {
            Object target = pool.GetObject();
            pool.RefCount--;
            if (target == null)
            {
                Debug.LogError("获取对象为空");
                return;
            }
            AddActivePoolInfo(target, pool.id);
            loadItem.callback(target);
        }
        else
        {
            Debug.LogError("没找到池子");
        }
    }