예제 #1
0
    public void OnEndDrag(PointerEventData eventData)
    {
        canvasGroup.alpha = 1f;
        if (current == rectTransform.anchoredPosition)
        {
            rectTransform.anchoredPosition = initial;
        }
        else
        {
            if (inventorySlot != InventorySlot.GetCurrentSlot())
            {
                inventorySlot.ClearSlot();
            }
            rectTransform.anchoredPosition = initial;
            if (inventorySlot.slotNumber == 26)
            {
                InventoryUI.ClearCraftingSlots();
            }
        }

        isDragging = false;
        canvasGroup.blocksRaycasts = true;
    }