예제 #1
0
    private void AddToDespawnedDic(IzPoolObject izPoolObject)
    {
        if (izPoolObject != null && this._strPoolName == izPoolObject.GetPoolName())
        {
            string           strPathName = izPoolObject.GetPathName();
            List <Transform> list        = null;
            if (!this._dicDespawned.TryGetValue(strPathName, out list) || list == null)
            {
                list = new List <Transform>();
            }
            list.Add(izPoolObject.GetTransform());
            this._dicDespawned[strPathName] = list;

            izPoolObject.GetTransform().parent = this._rootGameObject.transform;
        }
    }
예제 #2
0
 private void RemoveFromSpawnedDic(IzPoolObject izPoolObject)
 {
     if (izPoolObject != null && this._strPoolName == izPoolObject.GetPoolName())
     {
         string           strPathName = izPoolObject.GetPathName();
         List <Transform> list        = null;
         if (this._dicSpawned.TryGetValue(strPathName, out list) && list != null)
         {
             list.Remove(izPoolObject.GetTransform());
             this._dicSpawned[strPathName] = list;
         }
     }
 }