protected override void initWidget() { m_Node = this.transform.parent.GetComponent <TezTreeNode>(); m_Flag = this.GetComponent <Image>(); if (m_Node.isLeaf) { m_Flag.gameObject.SetActive(false); } }
public void setParent(TezTreeNode node) { parent = node; if (parent == null) { this.level = 0; } else { level = parent.level + 1; } }
public bool tryGet(ITezTreeData data, out TezTreeNode node) { for (int i = 0; i < m_Children.Count; i++) { if (m_Children[i].data.isEqual(data)) { node = m_Children[i]; return(true); } } node = null; return(false); }
protected override void onClose(bool self_close) { m_Node = null; }
public void selectNode(TezTreeNode node) { onSelectNode?.Invoke(node); }