Esempio n. 1
0
        private void SelectBranchRecursive(BTEditorGraphNode node)
        {
            m_selection.Add(node);
            node.OnSelected();

            for (int i = 0; i < node.ChildCount; i++)
            {
                SelectBranchRecursive(node.GetChild(i));
            }
        }
Esempio n. 2
0
 private void DeleteBreakpointsRecursive(BTEditorGraphNode node)
 {
     if (node != null && node.Node != null)
     {
         node.Node.Breakpoint = Breakpoint.None;
         for (int i = 0; i < node.ChildCount; i++)
         {
             DeleteBreakpointsRecursive(node.GetChild(i));
         }
     }
 }
Esempio n. 3
0
 public void OnNodeDeleteChildren(BTEditorGraphNode node)
 {
     if (node != null)
     {
         BTUndoSystem.BeginUndoGroup("Delete children");
         int childIndex = 0;
         while (node.ChildCount > 0)
         {
             BTUndoSystem.RegisterUndo(new UndoNodeDeleted(node.GetChild(0), childIndex));
             node.OnDeleteChild(0);
             childIndex++;
         }
         BTUndoSystem.EndUndoGroup();
     }
 }
Esempio n. 4
0
        public BTEditorGraphNode GetNodeByHash(string path)
        {
            byte[] actualPath = Convert.FromBase64String(path);
            if (actualPath != null)
            {
                BTEditorGraphNode node = m_masterRoot;

                for (int i = 0; i < actualPath.Length; i++)
                {
                    node = node.GetChild(actualPath[i]);
                    if (node == null)
                    {
                        return(null);
                    }
                }

                return(node);
            }

            return(null);
        }