public T GetItem() { T item; if (itemStack.Count > 0) { item = itemStack.Pop(); } else { item = PoolItem.CreateItem() as T; } return(item); }