Newer
Older
John Schihada
committed
using UnityEngine;
public class DropHandling : MonoBehaviour, IDropHandler, IPointerClickHandler
John Schihada
committed
var scrollFact = gameObject.GetComponent<RenderedScrollFact>();
Debug.Log(eventData.pointerDrag.GetComponent<FactWrapper>().fact.Label+ " was dropped on "
+ gameObject.name+ " " +scrollFact.ID + "/" +
ScrollDetails.ParameterDisplays.Count+" label: "+scrollFact.Label);
John Schihada
committed
John Schihada
committed
current = Instantiate(eventData.pointerDrag,Vector3.zero, Quaternion.identity);
John Schihada
committed
John Schihada
committed
currentFact = eventData.pointerDrag.GetComponent<FactWrapper>().fact;
Debug.Log("recieved Fact: " + currentFact.backendURI);
CommunicationEvents.NewAssignmentEvent.Invoke();
public void OnPointerClick(PointerEventData eventData) {
Destroy(current);
currentFact = null;
CommunicationEvents.NewAssignmentEvent.Invoke();
}