Esempio n. 1
0
 /// <summary>
 /// 添加子节点
 /// </summary>
 /// <param UIName="child"></param>
 internal void AddChildNode(IBaseUIForm child)
 {
     if (!childrenNodeID.Contains(child.ID))
     {
         //todo 对象池获取
         UIFormNode node = new UIFormNode();
         node.Init(child);
         childrenNode.Add(node.ID, node);
         childrenNodeID.Add(node.ID);
     }
     else
     {
         if (!childrenNode.ContainsKey(child.ID))
         {
             UIFormNode node = new UIFormNode();
             node.Init(child);
             childrenNode.Add(node.ID, node);
             Debug.LogError("添加子节点有误");
         }
         else
         {
             childrenNode[child.ID].Init(child);
         }
     }
 }
Esempio n. 2
0
 public void SetParent(IBaseUIForm parent)
 {
     parentNode.Init(parent);
 }