public BTNode FindParent(BTNode _target) { if (_target == null || _target == m_root) { return(null); } if (m_root != null) { return(m_root.FindParent(_target)); } return(null); }
public override BTNode FindParent(BTNode _target) { // check children if (m_child != null) { if (_target == m_child) { return(this); } return(m_child.FindParent(_target)); } return(null); }