Exemple #1
0
        public ZNodeComposite(ZNodeTree nodeTree, Rect wr, NODE_TYPE compositeType) : base(BASE_TYPE.COMPOSITE, nodeTree, wr)
        {
            nodeType = compositeType;

            _imgStyle.normal.background = NodeEditor.SkinItem.GetCompositeNodeImage(nodeType) as Texture2D;
            _inspectorName = nodeType.ToString();
        }
Exemple #2
0
        public ZNodeAction(ZNodeTree nodeTree, Rect wr, ZBTActionManager.NODE_TYPE actionType) : base(BASE_TYPE.ACTION, nodeTree, wr)
        {
            nodeType = actionType;

            _imgStyle.normal.background = NodeEditor.SkinItem.GetActionNodeImage(nodeType) as Texture2D;
            _inspectorName = nodeType.ToString();
        }
Exemple #3
0
 void CreateNewTree()
 {
     ResetBeforeTabSwitch();
     _currentNodeTree = new ZNodeTree(this);
     _nodeTrees.Add(_currentNodeTree);
     _nodeScrollView.Set(0, 0);
 }
Exemple #4
0
        public ZNodeDecorator(ZNodeTree nodeTree, Rect wr, NODE_TYPE decoratorType) : base(BASE_TYPE.DECORATOR, nodeTree, wr)
        {
            nodeType = decoratorType;

            _imgStyle.normal.background = NodeEditor.SkinItem.GetDecoratorNodeImage(nodeType) as Texture2D;
            _inspectorName = nodeType.ToString();
        }
Exemple #5
0
        public static ZNode CreateNode(NODE_TYPE nodeType, ZNodeTree nodeTree, Rect nodeRect, JSON js)
        {
            ZNode node = null;

            if (nodeType == NODE_TYPE.SEQUENCER)
            {
                node = new ZBTSequencer(nodeTree, nodeRect);
            }

            return(node);
        }
Exemple #6
0
        public static ZNode CreateNode(NODE_TYPE nodeType, ZNodeTree nodeTree, Rect nodeRect, JSON js)
        {
            ZNode node = null;

            if (nodeType == NODE_TYPE.REPEATER)
            {
                node = new ZBTRepeater(nodeTree, nodeRect);
            }

            return(node);
        }
Exemple #7
0
        public ZNode(BASE_TYPE type, ZNodeTree nodeTree, Rect wr)
        {
            BaseType    = type;
            _nodeTree   = nodeTree;
            _windowRect = wr;
            Name        = "";

            SetupSkinParams();

            _connectorList = new List <ZNodeConnector>();
            CreateInConnector();
            CreateOutConnector();
        }
Exemple #8
0
        public ZNodeSubTree(ZNodeTree nodeTree, Rect wr, JSON js) : base(BASE_TYPE.SUBTREE, nodeTree, wr)
        {
            _imgStyle.normal.background = NodeEditor.SkinItem.GetBaseNodeImage(BaseType) as Texture2D;
            _inspectorName = BaseType.ToString();

            treePath = "";

            if (js != null && js.Contains("nodeParams"))
            {
                JSON paramsJS = js.ToJSON("nodeParams");
                treePath = paramsJS.ToString("treePath");
            }
        }
Exemple #9
0
 void DeleteTab(int tabIdx)
 {
     _nodeTrees.RemoveAt(tabIdx);
     if (tabIdx < _nodeTrees.Count)
     {
         SwitchTab(_nodeTrees[tabIdx]);
     }
     else if (tabIdx > 0)
     {
         SwitchTab(_nodeTrees[tabIdx - 1]);
     }
     else
     {
         _currentNodeTree = null;
     }
 }
Exemple #10
0
 void SwitchTab(ZNodeTree newTree)
 {
     ResetBeforeTabSwitch();
     _currentNodeTree = newTree;
     _nodeScrollView  = _currentNodeTree.GetScrollView();
 }
Exemple #11
0
 public ZNodeRoot(ZNodeTree nodeTree, Rect wr) : base(BASE_TYPE.ROOT, nodeTree, wr)
 {
     _imgStyle.normal.background = NodeEditor.SkinItem.GetBaseNodeImage(BaseType) as Texture2D;
     _inspectorName = BaseType.ToString();
 }