Example #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;
     }
 }
Example #2
0
File: Dot.cs Project: Mervg1/Match3
 private void OnMouseDown()
 {
     firstTouch = Camera.main.ScreenToWorldPoint(Input.mousePosition);
     if (isSelected == true)
     {
         Deselect();
     }
     else
     {
         if (previousSelected == null)
         {
             Select();
         }
         else
         {
             previousSelected.Deselect();
             Select();
         }
     }
 }