Exemple #1
0
 void Update()
 {
     if (input.singleClick)
     {
         ClickCast();
     }
     if (input.doubleClick)
     {
         DoubleClickCast();
     }
     if (input.mouseDragStart)
     {
         DragCast();
     }
     if (input.mouseDrag)
     {
         currentDraggable?.OnDragUpdate(input.mouseScreenPosition, input.mouseWorldPosition);
     }
     if (input.mouseDragEnd)
     {
         currentDraggable?.OnDragEnd(input.mouseScreenPosition, input.mouseWorldPosition);
         currentDraggable = null;
     }
 }