From df9ef84585cbb83d42486e608e74c050a2e5271c Mon Sep 17 00:00:00 2001 From: unknown <john.schihada@hotmail.com> Date: Fri, 20 Nov 2020 01:41:11 +0100 Subject: [PATCH] Adjustment: Deleting ScrollAssignment with OnClickEvent --- Assets/Scripts/InventoryStuff/DropHandling.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/InventoryStuff/DropHandling.cs b/Assets/Scripts/InventoryStuff/DropHandling.cs index e265f1d2..4674a0b9 100644 --- a/Assets/Scripts/InventoryStuff/DropHandling.cs +++ b/Assets/Scripts/InventoryStuff/DropHandling.cs @@ -1,7 +1,7 @@ using UnityEngine; using UnityEngine.EventSystems; -public class DropHandling : MonoBehaviour, IDropHandler +public class DropHandling : MonoBehaviour, IDropHandler, IPointerClickHandler { GameObject current; public Fact currentFact; @@ -25,5 +25,11 @@ public void OnDrop(PointerEventData eventData){ CommunicationEvents.NewAssignmentEvent.Invoke(); } + public void OnPointerClick(PointerEventData eventData) { + Destroy(current); + currentFact = null; + CommunicationEvents.NewAssignmentEvent.Invoke(); + } + } \ No newline at end of file -- GitLab