예제 #1
0
 /// <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);
 }
예제 #2
0
 void Start()
 {
     Pooler.SetPooler(gameObject);
     //新建对象池
     Pooler.CreatePool("itemPool", pool, 0);
 }