Exemple #1
0
 void OnMouseDown()
 {
     if (!_newGameManager.PhoneOut)
     {
         if (Input.GetMouseButtonDown(0) && _newGameManager.CanInteractWithMouse)
         {
             if (this.gameObject.tag == "HasEvent")
             {
                 mouseClick.Play();
                 _newGameManager.CallEvent(typeOfObject);
             }
             else if (this.gameObject.tag == "Phone")
             {
                 mouseClick.Play();
                 NewGameManager.Instance.ShowPhone();
             }
         }
     }
 }