public void Initialize(PoolableObject parPrefabObect, int parNumber)
 {
     ObjectInPool = new List <PoolableObject>();
     for (int i = 0; i < parNumber; ++i)
     {
         PoolableObject go = MonoBehaviour.Instantiate(parPrefabObect);
         go.DeInit();
         ObjectInPool.Add(go);
     }
 }
示例#2
0
 // release an active object
 public void ReleasePooledObject(PoolableObject parObject)
 {
     parObject.DeInit();
 }