Esempio n. 1
0
 private void OnMouseDown()
 {
     Debug.Log(canShoot);
     if (!canShoot)
     {
         firstTouch = Camera.main.ScreenToWorldPoint(Input.mousePosition);
         if (isSelected == true)
         {
             Deselect();
         }
         else
         {
             if (previousSelected == null)
             {
                 Select();
             }
             else
             {
                 previousSelected.Deselect();
                 Select();
             }
         }
     }
     if (canShoot)
     {
         isMatched = true;
     }
 }
Esempio n. 2
0
File: Dot.cs Progetto: Mervg1/Match3
 private void OnMouseDown()
 {
     firstTouch = Camera.main.ScreenToWorldPoint(Input.mousePosition);
     if (isSelected == true)
     {
         Deselect();
     }
     else
     {
         if (previousSelected == null)
         {
             Select();
         }
         else
         {
             previousSelected.Deselect();
             Select();
         }
     }
 }