예제 #1
0
 public SpawnPool this[string key]
 {
     get
     {
         SpawnPool pool = null;
         _spawnPools.TryGetValue(key, out pool);
         return(pool);
     }
 }
예제 #2
0
        public void Destroy(string poolName)
        {
            SpawnPool spawnPool = null;

            if (_spawnPools.TryGetValue(poolName, out spawnPool))
            {
                _spawnPools.Remove(poolName);
                Object.Destroy(spawnPool);
            }
        }
예제 #3
0
        internal void Add(SpawnPool pool)
        {
            if (_spawnPools.ContainsKey(pool.PoolName))
            {
                Debug.LogError(string.Format("池名称以被使用 [{0}]", pool.PoolName));

                return;
            }

            _spawnPools.Add(pool.PoolName, pool);
        }
예제 #4
0
 internal void Remove(SpawnPool pool)
 {
     _spawnPools.Remove(pool.PoolName);
 }