void OnMouseDown()
 {
     if (da.CanDrag)
     {
         dragging = true;
         da.OnStartDrag();
         zDisplacement = -Camera.main.transform.position.z + transform.position.z;
         if (UsePointerDisplacement)
         {
             pointerDisplacement = -transform.position + MouseInWorldCoords();
         }
         else
         {
             pointerDisplacement = Vector3.zero;
         }
     }
 }
Beispiel #2
0
 void OnMouseDown()
 {
     //when combocard is active, can not drag
     if (da.CanDrag)
     {
         dragging = true;
         HoverPreview.PreviewsAllowed = false;
         da.OnStartDrag();
         zDisplacement = -Camera.main.transform.position.z + transform.position.z;
         if (UsePointerDisplacement)
         {
             pointerDisplacement = -transform.position + MouseInWorldCoords();
         }
         else
         {
             pointerDisplacement = Vector3.zero;
         }
     }
 }
 void OnMouseDown()
 {
     Debug.Log("OnMousedown");
     if (da.CanDrag)
     {
         dragging = true;
         //HoverPreview.PreviewsAllowed = false;       // NEW LINE
         da.OnStartDrag();
         zDisplacement = -Camera.main.transform.position.z + transform.position.z;
         if (UsePointerDisplacement)
         {
             pointerDisplacement = -transform.position + MouseInWorldCoords();
         }
         else
         {
             pointerDisplacement = Vector3.zero;
         }
     }
 }