示例#1
0
 public void Connect(Box abox, Box bbox)
 {
     if (abox.adaptBoxTags.Contains(bbox.tag))
     {
         abox.AddChildBox(bbox);
     }
     else if (bbox.adaptBoxTags.Contains(abox.tag))
     {
         bbox.AddChildBox(abox);
     }
 }
示例#2
0
 public void ConnectDrop(Box box)
 {
     if (currentConnectBox == box)
     {
         return;
     }
     if (currentMode == mode.connectPrent)
     {
         if (box.adaptBoxTags.Contains(currentConnectBox.tag))
         {
             box.AddChildBox(currentConnectBox);
         }
     }
     else if (currentMode == mode.connectchild)
     {
         if (currentConnectBox.adaptBoxTags.Contains(box.tag))
         {
             currentConnectBox.AddChildBox(box);
         }
     }
 }