/// <summary> /// 初始化对象池 /// </summary> void PoolerInit() { Pooler.SetPooler(pooler); Pooler.CreatePool(PoolType.HeroPool.ToString(), heroPrefab); Pooler.CreatePool(PoolType.DoorPool.ToString(), doorPrefab); Pooler.CreatePool(PoolType.TextPool.ToString(), textPrefab); }
void Start() { Pooler.SetPooler(gameObject); //新建对象池 Pooler.CreatePool("itemPool", pool, 0); }