Пример #1
0
 public void OnDrag(PointerEventData eventData)
 {
     if (eventData.button == PointerEventData.InputButton.Left)
     {
         var delta = PreviousPanPosition - (Vector3)Util.Util.MouseWorldCoordinates;
         CameraAdjust.Pan(delta);
         CameraAdjust.Clamp();
     }
 }
Пример #2
0
 // Update is called once per frame
 private void Update()
 {
     if (!Frozen)
     {
         var scrollDelta = Input.GetAxis("Mouse ScrollWheel");
         if (scrollDelta != 0)
         {
             CameraAdjust.Zoom(scrollDelta, Util.Util.MouseWorldCoordinates);
             CameraAdjust.Clamp();
         }
     }
 }