public SpawnPool this[string key] { get { SpawnPool pool = null; _spawnPools.TryGetValue(key, out pool); return(pool); } }
public void Destroy(string poolName) { SpawnPool spawnPool = null; if (_spawnPools.TryGetValue(poolName, out spawnPool)) { _spawnPools.Remove(poolName); Object.Destroy(spawnPool); } }
internal void Add(SpawnPool pool) { if (_spawnPools.ContainsKey(pool.PoolName)) { Debug.LogError(string.Format("池名称以被使用 [{0}]", pool.PoolName)); return; } _spawnPools.Add(pool.PoolName, pool); }
internal void Remove(SpawnPool pool) { _spawnPools.Remove(pool.PoolName); }