public void OnDrag(PointerEventData eventData) { if (eventData.button == PointerEventData.InputButton.Left) { dragging = true; if (input != null) { connected = false; input.GetComponent <SMExecutionInput>().Unlink(); if (gameObject.tag == "EXOutputTwo") { SMIF temp = (SMIF)node; temp.SetNextFalse(null); } else { node.SetNext(null); } } } }
public void OnEndDrag(PointerEventData eventData) { if (eventData.button == PointerEventData.InputButton.Left) { dragging = false; input = CheckOverInput(); if (input != null) { connected = true; SMExecutionInput EXin = input.GetComponent <SMExecutionInput>(); EXin.Link(node); if (gameObject.tag == "EXOutputTwo") { SMIF temp = (SMIF)node; temp.SetNextFalse(EXin.node); } else { node.SetNext(EXin.node); } } } }