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(); }
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(); }
void CreateNewTree() { ResetBeforeTabSwitch(); _currentNodeTree = new ZNodeTree(this); _nodeTrees.Add(_currentNodeTree); _nodeScrollView.Set(0, 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(); }
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); }
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); }
public ZNode(BASE_TYPE type, ZNodeTree nodeTree, Rect wr) { BaseType = type; _nodeTree = nodeTree; _windowRect = wr; Name = ""; SetupSkinParams(); _connectorList = new List <ZNodeConnector>(); CreateInConnector(); CreateOutConnector(); }
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"); } }
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; } }
void SwitchTab(ZNodeTree newTree) { ResetBeforeTabSwitch(); _currentNodeTree = newTree; _nodeScrollView = _currentNodeTree.GetScrollView(); }
public ZNodeRoot(ZNodeTree nodeTree, Rect wr) : base(BASE_TYPE.ROOT, nodeTree, wr) { _imgStyle.normal.background = NodeEditor.SkinItem.GetBaseNodeImage(BaseType) as Texture2D; _inspectorName = BaseType.ToString(); }