Exemple #1
0
        public void AddChild(Node child)
        {
            m_ChildrenNodes.Add(child);

            // Set the childs parent
            child.Parent = this;

            // Set to refresh the hierarchy
            m_Refresh = true;
        }
Exemple #2
0
        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;
            }
        }
Exemple #3
0
        public Node FindChild(Node child)
        {
            Node result = m_ChildrenNodes.Find( delegate(Node childNode) { return childNode == child; } );

            return result;
        }