Beispiel #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;
     }
 }
Beispiel #2
0
 private void OnMouseDown()
 {
     firstTouch = Camera.main.ScreenToWorldPoint(Input.mousePosition);
     if (isSelected == true)
     {
         Deselect();
     }
     else
     {
         if (previousSelected == null)
         {
             Select();
         }
         else
         {
             previousSelected.Deselect();
             Select();
         }
     }
 }