override protected void ChildInit() { this.type = NodeType.Start; connectorDataList = new ConnectorData[] { ScriptableObject.CreateInstance <ConnectorData>().Init(1, id, ConnectorType.Output), }; }
override protected void ChildInit() { this.type = NodeType.SelectionThree; connectorDataList = new ConnectorData[] { ScriptableObject.CreateInstance <ConnectorData>().Init(1, id, ConnectorType.Input), ScriptableObject.CreateInstance <ConnectorData>().Init(2, id, ConnectorType.Output), ScriptableObject.CreateInstance <ConnectorData>().Init(3, id, ConnectorType.Output), ScriptableObject.CreateInstance <ConnectorData>().Init(4, id, ConnectorType.Output) }; }
public Connector Init(WordNodeEditorWindow window, NodeBase node, ConnectorData data) { _window = window; _node = node; _data = data; _rect = new Rect(0, 0, 20, 20); return(this); }
protected void AddConnector(ConnectorData connectorData) { if (connectorData.type == ConnectorType.Input) { _inputCount += 1; } if (connectorData.type == ConnectorType.Output) { _outputCount += 1; } var connector = ScriptableObject.CreateInstance <Connector>().Init(_window, this, connectorData); _connectorMap.Add(connectorData.id, connector); _rect.height = Mathf.Max(_inputCount, _outputCount) * 30.0f; }