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()); } }
public void Dispose() { ClassObjectPool.Dispose(); }
/// <summary> /// 释放类对象池 /// </summary> public void ClearClassObjectPool() { ClassObjectPool.ClearPool(); }
public PoolManager() { ClassObjectPool = new ClassObjectPool(); GameObjectPool = new GameObjectPool(); }