Example #1
0
 private void OnPointerUp(PointerEventData eventData)
 {
     if (dragging && !EventSystem.current.IsPointerOverGameObject(eventData.pointerId))
     {
         BoardTarget target = null;
         RaycastHit  hit;
         if (Physics.Raycast(cam.ScreenPointToRay(eventData.position), out hit, 100f))
         {
             target = hit.transform.GetComponent <BoardTarget>();
         }
         if (card.Cast(target, manager))
         {
             Destroy(gameObject);
         }
     }
     dragging      = false;
     line1.enabled = false;
     line2.enabled = false;
     manager.board.Unlight();
 }