예제 #1
0
    private void OnButtonClick()
    {
        if (relatedInventory == null || relatedBodyType == null)
        {
            return;
        }

        BodyPart bodyPart = relatedInventory.Player.Body.GetBodyPart(relatedBodyType);

        if (bodyPart == null)
        {
            return;
        }

        if (bodyPart.EquippedItem == AssignedItem)
        {
            UnequiSelectedItem();
        }
        else
        {
            EquipSelectedItem();
        }

        owner?.UpdateItemSlots();
    }