public static void ShowWindow() { window = EditorWindow.GetWindow <TreeNodeWindow>(); window.position = windowsPosition; window.autoRepaintOnSceneChange = true; window.Show(); }
public static void Closed() { if (null != window) { window.Close(); window = null; } }
public void OnGUI(TreeNodeWindow window) { _treeNodeWindow = window; _behaviorDrawView.Init(_treeNodeWindow, this); NodeValue currentNode = _behaviorDrawModel.GetCurrentSelectNode(); List <NodeValue> nodeList = _behaviorDrawModel.GetNodeList(); _behaviorDrawView.Draw(_treeNodeWindow.position, currentNode, nodeList); }
public static void ShowWindow() { window = EditorWindow.GetWindow <TreeNodeWindow>(); window.position = windowsPosition; window.autoRepaintOnSceneChange = true; window.Show(); EditorPrefs.SetFloat(BehaviorTreeX, windowsPosition.x); EditorPrefs.SetFloat(BehaviorTreeY, windowsPosition.y); EditorPrefs.SetFloat(BehaviorTreeWidth, windowsPosition.width); EditorPrefs.SetFloat(BehaviorTreeHeight, windowsPosition.height); }
public void OnGUI(TreeNodeWindow window) { _treeNodeWindow = window; _behaviorDrawView.Init(_treeNodeWindow, this); NodeValue currentNode = _behaviorDrawModel.GetCurrentSelectNode(); List <NodeValue> nodeList = new List <NodeValue>(); if (BehaviorManager.Instance.CurrentOpenSubTreeId >= 0) { nodeList = _behaviorDrawModel.GetSubTreeNode(BehaviorManager.Instance.CurrentOpenSubTreeId); } else { nodeList = _behaviorDrawModel.GetBaseNode(); } nodeList = CheckDrawNode(nodeList); _behaviorDrawView.Draw(_treeNodeWindow.position, currentNode, nodeList); }
public void Init(TreeNodeWindow window, BehaviorDrawController drawController) { _treeNodeWindow = window; _drawController = drawController; }