Ejemplo 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;
             }
         }
     }
 }
Ejemplo n.º 2
0
 private void ShowBridge()
 {
     if (colliders.Count == 0)
     {
         Manipulatable manipulatable = objectGO.GetComponent <Manipulatable>();
         manipulatable.ShowBridge();
     }
 }