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

            if (_spawnPools.TryGetValue(poolName, out spawnPool))
            {
                _spawnPools.Remove(poolName);
                Object.Destroy(spawnPool);
            }
        }
Beispiel #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);
        }
Beispiel #4
0
 internal void Remove(SpawnPool pool)
 {
     _spawnPools.Remove(pool.PoolName);
 }