コード例 #1
0
 public bool ValidateConnection(IConnectionOut @out)
 {
     if (connectionState)
     {
         return(false);
     }
     return(connectionState = _connectionResponse.Invoke(@out));
 }
コード例 #2
0
 public bool Connect(IConnectionOut outConnection)
 {
     if (outConnection == null)
     {
         return(false);
     }
     _display = new DisplayNode(new InConnection(outConnection));
     return(true);
 }
コード例 #3
0
 public static void RequestConnection(UIOutConnectionPoint uiOut, IConnectionOut @out)
 {
     if (CurrentAcceptingDrag.ValidateConnection(@out))
     {
         ConnectionCreatedEvent.Invoke(CurrentSendingDrag, CurrentAcceptingDrag);
     }
     else
     {
         Debug.Log("cancel connection request");
         CurrentAcceptingDrag = null;
         CurrentSendingDrag   = null;
     }
 }
コード例 #4
0
 public UIOutConnectionPoint(Rect rect, IConnectionOut @out)
 {
     Out           = @out;
     Rect          = rect;
     Content       = new GUIContent("Out: " + ControlId);
     SelectedStyle = new GUIStyle("CN Box")
     {
         alignment = TextAnchor.LowerLeft, fontSize = 8
     };
     NormalStyle = new GUIStyle("CN Box")
     {
         alignment = TextAnchor.LowerLeft, fontSize = 8
     };
     Style = NormalStyle;
 }
コード例 #5
0
 public InConnection(IConnectionOut outConnection)
 {
     Out = outConnection;
 }