public virtual PoolItem GetAPoolObject() { int index = _inactives.Count - 1; if (index < 0) { AddToPool(); index = 0; } PoolItem obj = _inactives[index]; _inactives.RemoveAt(index); _actives.Add(obj); obj.Activate(); return(obj); }
public virtual PoolItem GetAPoolObject() { int index = _inactives.Count - 1; if (index < 0) { AddToPool(); index = 0; } PoolItem obj = _inactives[index]; _inactives.RemoveAt(index); _actives.Add(obj); obj.Activate(); return(obj); }