예제 #1
0
    public void OnEndDrag(PointerEventData eventData)
    {
        GameObject          _inventory           = Global.Obj.GetInventory();
        InventoryController _inventoryController = _inventory.GetComponent <InventoryController>();
        GameObject          _slot           = eventData.pointerDrag.GetComponent <PerentReference>().perent;
        ItemObject          _item           = _slot.GetComponent <ItemCell>().item;
        SlotController      _slotController = _slot.GetComponent <SlotController>();

        if (IsPointerOverUIElement() == false)
        {
            _inventoryController.DropItem(_item, _slotController.GetContainerItemType());
            _slotController.RemoveItem();
        }

        EventSubstitude eventSubstitude = new EventSubstitude();

        eventSubstitude.InvokeDressEvent(_slotController.GetItemType(), false);

        itemSpriteCanvasGroup.blocksRaycasts = true;
        rt.anchoredPosition = originPosition;
    }