Esempio n. 1
0
 public void UpdateBridgeIcon(Manipulatable m)
 {
     if (m.drawBridge)
     {
         m.ShowBridge();
         foreach (Transform child in ToggleBridgeButton.transform)
         {
             if (child != ToggleBridgeButton.transform && child.GetComponent <Image>())
             {
                 child.GetComponent <Image>().sprite = BridgeOffSprite;
                 break;
             }
         }
     }
     else
     {
         m.HideBridge();
         foreach (Transform child in ToggleBridgeButton.transform)
         {
             if (child != ToggleBridgeButton.transform && child.GetComponent <Image>())
             {
                 child.GetComponent <Image>().sprite = BridgeOnSprite;
                 break;
             }
         }
     }
 }
Esempio n. 2
0
 void OnTriggerEnter(Collider col)
 {
     if (objectGO != null)
     {
         if (col.tag.Equals(TAG))
         {
             colliders.Add(col);
             Manipulatable manipulatable = objectGO.GetComponent <Manipulatable>();
             if (manipulatable.isSelected)
             {
                 manipulatable.HideBridge();
             }
         }
     }
     else
     {
         Debug.Log("Trigger entered on bridge without it's ObjectGO set");
     }
 }