diff --git a/Assets/Scripts/InventoryStuff/DropHandling.cs b/Assets/Scripts/InventoryStuff/DropHandling.cs index e265f1d2f1d2e5ff4d8d657d1eb18e083d2e2831..4674a0b9cf88869e9955bdc5ef438ff5fada6fbb 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