Example #1
0
                public virtual void traverse(int p_index)
                {
                    if (p_index >= CurrentChildren)
                    {
                        Debug.LogError("Tree Traversal index does not exist");
                    }

                    ATreeNode <T> child = m_current_node.getChild(p_index);

                    if (child == null)
                    {
                        m_current_node = m_root;
                    }
                    else
                    {
                        m_current_node = child;
                    }
                }
Example #2
0
 public ATreeNode(ATreeNode <T> p_parent)
 {
     m_parent   = p_parent;
     m_self     = setSelf();
     m_children = new List <ATreeNode <T> >();
 }
Example #3
0
 public Tree(ATreeNode <T> p_root)
 {
     m_root         = p_root;
     m_current_node = p_root;
 }