Esempio n. 1
0
 public void Connect(LightBulb other, bool pipe = true)
 {
     if (other != null && !_bulbs.Contains(other))
     {
         _bulbs.Add(other);
         other.Connect(this, false);
         if (pipe)
         {
             Instantiate(ProtoPipe, (transform.position + other.transform.position) / 2, Quaternion.LookRotation((transform.position - other.transform.position), Vector3.up));
         }
     }
 }