示例#1
0
    public void PickupItem(WorldItem worldItem)
    {
        int freeSlot = FindFreeSlot();

        if (freeSlot == -1)
        {
            return;
        }

        slots[freeSlot].SetItem(worldItem.GetItem());
        worldItem.Pickup();
    }