Skip to content
Snippets Groups Projects
Commit df9ef845 authored by John Schihada's avatar John Schihada
Browse files

Adjustment: Deleting ScrollAssignment with OnClickEvent

parent d67c5ca5
No related branches found
No related tags found
No related merge requests found
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
public class DropHandling : MonoBehaviour, IDropHandler public class DropHandling : MonoBehaviour, IDropHandler, IPointerClickHandler
{ {
GameObject current; GameObject current;
public Fact currentFact; public Fact currentFact;
...@@ -25,5 +25,11 @@ public void OnDrop(PointerEventData eventData){ ...@@ -25,5 +25,11 @@ public void OnDrop(PointerEventData eventData){
CommunicationEvents.NewAssignmentEvent.Invoke(); CommunicationEvents.NewAssignmentEvent.Invoke();
} }
public void OnPointerClick(PointerEventData eventData) {
Destroy(current);
currentFact = null;
CommunicationEvents.NewAssignmentEvent.Invoke();
}
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment