コード例 #1
0
        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]);
        }
コード例 #2
0
 private PoolController(AbstractPool pool)
 {
     _Pool = pool;
     PoolParent.position = Vector3.zero;
 }