public void AddChild(Node child) { m_ChildrenNodes.Add(child); // Set the childs parent child.Parent = this; // Set to refresh the hierarchy m_Refresh = true; }
public void RemoveChild(Node child) { bool result = m_ChildrenNodes.Remove(child); // No longer has a parent or siblings if (result) { child.Parent = null; child.NextSibling = null; child.PreviousSibling = null; // Set to refresh the hierarchy m_Refresh = true; } }
public Node FindChild(Node child) { Node result = m_ChildrenNodes.Find( delegate(Node childNode) { return childNode == child; } ); return result; }