void OnMouseDown()
 {
     if (!grid)
     {
         return;
     }
     pickupTime = Time.time;
     pickupPos  = transform.position;
     offset     = transform.position - RaycastPlane();
     UpdatePosition(true);
     FXManager.PlaySound("socket_lift");
 }
 private void OnMouseUp()
 {
     if (!grid)
     {
         return;
     }
     UpdatePosition(false);
     if (transform.position == pickupPos && Time.time - pickupTime < 1.0)
     {
         _selectionHandler.Select(this);
     }
     FXManager.PlaySound("socket_drop");
 }
        public void Rotate()
        {
            var selection = _selectionHandler.Selected;

            if (selection)
            {
                var euler = selection.transform.localRotation.eulerAngles;
                euler.z += 45;
                var rot = selection.transform.localRotation;
                rot.eulerAngles = euler;
                selection.transform.localRotation = rot;
                FXManager.PlaySound("socket_spin");
            }
        }