private void SelectBranchRecursive(BTEditorGraphNode node) { m_selection.Add(node); node.OnSelected(); for (int i = 0; i < node.ChildCount; i++) { SelectBranchRecursive(node.GetChild(i)); } }
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)); } } }
private void MoveNonSelectedChildren(BTEditorGraphNode node, Vector2 delta) { for (int i = 0; i < node.ChildCount; i++) { var child = node.GetChild(i); if (m_selection.IndexOf(child) < 0) { child.NodePositon = child.NodePositon + delta; MoveNonSelectedChildren(child, delta); } } }
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(); } }
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); }