protected void Forward(GameObject obj) { NodePort target = GetOutputPort("target"); int c = target.ConnectionCount; for (int i = 0; i < c; i++) { NodePort port = target.GetConnection(i); if (port == null) { continue; } StyleNode styleNode = port.node as StyleNode; if (styleNode == null) { continue; } styleNode.Apply(obj); } }
public void Apply(GameObject obj) { nodes.ForEach(node => { StyleNode styleNode = node as StyleNode; if (styleNode == null) { return; } if (styleNode.GetPort("origin").ConnectionCount > 0) { return; } styleNode.Apply(obj); }); }