示例#1
0
文件: Slot.cs 项目: JukovYuri/Joint
    public void ApplyItem()
    {
        if (!isFull)
        {
            return;
        }

        SubNumberOfItems();

        pickUp.ApplyPickUp();

        if (pickUp.isOneOff)
        {
            inventory.SubFromTotalWeight(pickUp.itemWeigth);

            if (numberOfItems > 0)
            {
                return;
            }

            ClearSlot();
            return;
        }

        ChangeItemsSlotAndInventory();

        if (numberOfItems > 0)
        {
            return;
        }

        ClearSlot();
    }