public void OnEndDrag(PointerEventData eventData)
{
if (eventData == null || eventData.button != PointerEventData.InputButton.Left)
return;
Controller.CursorManager.UnfreezeCursorTexture();
Controller.DescriptionController.UnfreezeForItemUse();
Controller.DescriptionController.SetDescription("", false);
transform.SetParent(transformParent, true);
transform.localPosition = oldLocalPosition;
transform.localRotation = oldLocalRotation;
transform.localScale = oldLocalScale;
RaycastHit2D hit = Physics2D.Raycast(Camera.main.ScreenToWorldPoint(Input.mousePosition), Vector2.zero);
if (hit.collider != null)
{
var usable = hit.collider.GetComponent<ItemUsableArea>();
if (usable)
{
// usable.Use(ItemId);
}
}
if (DraggedOver != null)
DraggedOver.Use(ItemId);
DraggedObject = null;
DraggedOver = null;
Controller.KeyboardInputDisabled = false;
}