Пример #1
0
 public void onClick()
 {
     if (Stage1dController.mudarStatus(this))
     {
         Debug.Log("PRESSED");
         if (this.connected)
         {
             objAtual.GetComponentInChildren <Image>().sprite = sprites[1];
             if (nome.Contains("Bypass"))
             {
                 foreach (GameObject obj in this.connectionsBypass)
                 {
                     obj.GetComponentInChildren <Image>().sprite = sprites[3];
                 }
             }
         }
         else
         {
             objAtual.GetComponentInChildren <Image>().sprite = sprites[0];
             if (nome.Contains("Bypass"))
             {
                 foreach (GameObject obj in this.connectionsBypass)
                 {
                     obj.GetComponentInChildren <Image>().sprite = sprites[2];
                 }
             }
         }
         this.connected = !this.connected;
     }
 }