public static PoolController Get(AbstractPool pool) { var type = pool.GetType(); if (_ExistingPools == null) { _ExistingPools = new Dictionary <Type, PoolController>(); } if (_ExistingPools.TryGetValue(type, out PoolController value)) { if (value != null) { return(value); } } _ExistingPools.Add(type, new PoolController(pool)); return(_ExistingPools[type]); }
private PoolController(AbstractPool pool) { _Pool = pool; PoolParent.position = Vector3.zero; }