Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (Vector3.Distance(transform.position, rightPosition) < 0.9f)
     {
         if (!selected)
         {
             if (!inRightPosition)
             {
                 transform.position = rightPosition;
                 inRightPosition    = true;
                 dragAndDrop.CorrectPiece();
                 GetComponent <SortingGroup>().sortingOrder = 0;
             }
         }
     }
 }