Beispiel #1
0
 public void Initialize(Vector2 position, float width, float height, GUIStyle nodeStyle, GUIStyle selectedStyle, GUIStyle inPointStyle, GUIStyle outPointStyle, Action <ConnectionPoint> OnClickInPoint, Action <ConnectionPoint> OnClickOutPoint, Action <Node> OnClickRemoveNode)
 {
     rect     = new Rect(position.x, position.y, width, height);
     style    = nodeStyle;
     inPoint  = ScriptableObject.CreateInstance <ConnectionPoint>();
     outPoint = ScriptableObject.CreateInstance <ConnectionPoint>();
     inPoint.Initialize(this, ConnectionPointType.In, inPointStyle, OnClickInPoint);
     outPoint.Initialize(this, ConnectionPointType.Out, outPointStyle, OnClickOutPoint);
     defaultNodeStyle  = nodeStyle;
     selectedNodeStyle = selectedStyle;
     OnRemoveNode      = OnClickRemoveNode;
 }