コード例 #1
0
 public void Connect(InfoObject o, Color color, AGraphicalPrimitive p)
 {
     if (trees.ContainsKey(p.Base()))
     {
         if (connectedInfObs.Contains(o))
         {
             foreach (var tree in trees.Values)
             {
                 if (!tree.Connects(o))
                 {
                     tree.Connect(this, o, p, color);
                     p.Brush(color);
                 }
             }
         }
     }
     else
     {
         var tree = Instantiate(VisBridgeTreePrefab);
         tree.Assign(this, p.Base());
         trees.Add(p.Base(), tree);
         tree.Subscribe(this);
         tree.Connect(this, o, p, color);
         p.Brush(color);
     }
 }
コード例 #2
0
 // .................................................................... Unity
 // Use this for initialization
 public void Awake()
 {
     center.Brush(Color.green);
 }