示例#1
0
    public void ReturnItem(PoolItem itemToReturn)
    {
        if (itemToReturn == null)
        {
            return;
        }

        itemToReturn.IsActive = false;
        itemToReturn.OnDespawn();
        itemToReturn.transform.SetParent(myTransform);
        itemToReturn.gameObject.SetActive(false);

        disabledItems.Add(itemToReturn);
    }