Esempio n. 1
0
 void OnMouseOver()
 {
     if (Input.GetMouseButton(0))
     {
         Debug.Log(this.gameObject.name + " left click");
         rend.material.color = Color.green;
         if (partOfPuzzle)
         {
             correct = true;
         }
         else
         {
             correct = false;
         }
         board.CheckIfCorrect();
     }
     if (Input.GetMouseButton(1))
     {
         Debug.Log(this.gameObject.name + " right click");
         rend.material.color = Color.red;
         if (!partOfPuzzle)
         {
             correct = true;
         }
     }
 }