Beispiel #1
0
 // Update is called once per frame
 void Update()
 {
     if (_mouseDown && draggable && !_inventory.IsOpen)
     {
         var currentPos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
         var diff       = currentPos - _startMousePos;
         var pos        = _startPos + diff;
         transform.position = pos;
         if (_haveDragHandler)
         {
             _dragHandler.HandleDrag();
         }
         GameMasterScript.instance.CurrentHeldItem = this;
     }
 }