public PoolManager()
        {
            ClassObjectPool = new ClassObjectPool();
            GameObjectPool  = new GameObjectPool();
            AssetBundlePool = new ResourcePool("AssetBundlePool");
            AssetPool       = new Dictionary <AssetCategory, ResourcePool>();

            var enumerator = Enum.GetValues(typeof(AssetCategory)).GetEnumerator();

            while (enumerator.MoveNext())
            {
                AssetCategory assetCategory = (AssetCategory)enumerator.Current;
                if (assetCategory == AssetCategory.None)
                {
                    continue;
                }
                AssetPool[assetCategory] = new ResourcePool(assetCategory.ToString());
            }
        }
Exemplo n.º 2
0
 public void Dispose()
 {
     ClassObjectPool.Dispose();
 }
Exemplo n.º 3
0
 /// <summary>
 /// 释放类对象池
 /// </summary>
 public void ClearClassObjectPool()
 {
     ClassObjectPool.ClearPool();
 }
Exemplo n.º 4
0
 public PoolManager()
 {
     ClassObjectPool = new ClassObjectPool();
     GameObjectPool  = new GameObjectPool();
 }