public void OnPointerClick(PointerEventData eventData) { if (eventData.button == PointerEventData.InputButton.Left && _inventar.isDragAndDropState) { _inventar.GetDragAndDropItem(); Debug.Log("Drop"); } }
public void OnPointerClick(PointerEventData eventData) { if (eventData.button == PointerEventData.InputButton.Right) { if (IsFree == false) { TItem item = (TItem)_inventar.QuickSetEquipment(_item); if (item != null) { _item = item; ShowNewImage(item.Sprite); } else { ClearSlot(); } } } else if (eventData.button == PointerEventData.InputButton.Left) { if (_inventar.isDragAndDropState == false) { _inventar.SetDropAndDragItem(_item); ClearSlot(); } else { Item item = _inventar.GetDragAndDropItem(); if (item is TItem) { _inventar.SetDropAndDragItem(ChangeItem(item as TItem)); } else { _inventar.SetDropAndDragItem(item); } } } }