Path-O-LOGIC Keynote

Path-O-LOGIC Keynote

1、

OnSpawned()
OnSpawned(SpawnPool pool)

2、

OnDespawned()
OnDespawned(SpawnPool pool)

3、PoolManager只有一个类成员

  

4、PoolManager.Pools[]

  class Pools["poolName"] : IDictionary

   returns: SpawnPool
  
Pools is the primary means for accessing PoolManager's SpawnPools. 
 
Note the use of square brackets when providing the name of a pool:

// Print the number of spawned instances in a pool called "Enemies"
Debug.Log(PoolManager.Pools["Enemies"].Count());
 
Create方法,创建一个新SpawnPool对象。
  
在SpawnPool在Awake()方法中,此SpawnPool会被添加到PoolManager.pools中。
  
5、SpawnPool
  
class SpawnPool : List<Transform>
 
Description
SpawnPools handle most of the PoolManager functionality by managing PrefabPools. SpawnPools are almost always accessed via the PoolManager.Pools dictionary.
 
 
原文地址:https://www.cnblogs.com/tekkaman/p/5454947.html