/// <summary> /// Removes a node /// </summary> /// <param name="node">Removes the specified node</param> public void RemoveNode(Node node) { if (CanDeleteNode != null && !CanDeleteNode(node)) { return; } Nodes.Remove(node); OnNodeRemoved.SafeInvoke(this, new NodeRemovedEventArgs(node)); }
public void RemoveNode(string name) { RenderNode node = GetNodeByName(name); if (node != null) { Nodes.Remove(node); node.Disconnect(); OnNodeRemoved?.Invoke(this, node); } }
protected void RemoveNode(BaseNode node) { node.Disconnect(); node.OnConnected -= OnNodeConnected; node.OnDisconnect -= OnNodeDisconnected; if (node is BaseOutputNode) { OutputNodes.Remove((BaseOutputNode)node); } else { InputNodes.Remove((BaseInputNode)node); } OnNodeRemoved?.Invoke(this, node); }
public void RemoveNode(INode n) { try { Nodes.Remove(n); OnGraphChanged?.Invoke(); OnNodeRemoved?.Invoke(n); n.OnConnectorAdded -= ConnectorAdded; n.OnConnectorRemoved -= ConnectorRemoved; n.OnNodeRemoved -= RemoveNode; } catch { throw new Exception(); } }
public bool RemoveNode(string nodeName) { if (!Nodes.TryGetValue(nodeName, out BaseNode node)) { return(false); } Nodes.Remove(nodeName); Behaviour.PlayableGraph.DestroyPlayable(node.Playable); if (node is IUpdatableNode updatableNode) { UpdatableNodes.Remove(updatableNode); } OnNodeRemoved?.Invoke(node); return(true); }
/// <summary> /// <inheritdoc /> /// </summary> public void NodeRemoved(Guid instanceGuid) { OnNodeRemoved?.Invoke(instanceGuid); }
private void ShrinkSplineBack() { groundSpline.RemovePointAt(0); OnNodeRemoved?.Invoke(groundSpline.GetPosition(0)); }