示例#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);
 }