コード例 #1
0
 public static void ShowWindow()
 {
     window          = EditorWindow.GetWindow <TreeNodeWindow>();
     window.position = windowsPosition;
     window.autoRepaintOnSceneChange = true;
     window.Show();
 }
コード例 #2
0
 public static void Closed()
 {
     if (null != window)
     {
         window.Close();
         window = null;
     }
 }
コード例 #3
0
    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);
    }
コード例 #4
0
    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);
    }
コード例 #5
0
    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);
    }
コード例 #6
0
 public void Init(TreeNodeWindow window, BehaviorDrawController drawController)
 {
     _treeNodeWindow = window;
     _drawController = drawController;
 }