Пример #1
0
        /// <summary>
        ///     when a connection is created add it to the connections list to draw
        /// </summary>
        /// <param name="out">the ui element associated with the out connection</param>
        /// <param name="in">the ui element associated with the in connection</param>
        private void OnConnectionCreated(UIOutConnectionPoint @out, UIInConnectionPoint @in)
        {
            if (@out != null && @in != null)
            {
                Connections.Add(new UIBezierConnection(@out, @in));
            }

            CurrentSendingDrag   = null;
            CurrentAcceptingDrag = null;
        }
Пример #2
0
        public UINode(Vector2 pos, Vector2 size) : base("Transformation: ", pos, size)
        {
            _display = new DisplayNode(null);
            _in      = new UIInConnectionPoint(new Rect(Rect.position, new Vector2(50, 50)), Connect);

            _transformation = new InputNode();
            _input          = new InputNode();
            _out            = new UIOutConnectionPoint(new Rect(Rect.position, new Vector2(50, 50)),
                                                       new OutConnection(_transformation));
        }
Пример #3
0
 public UIDisplayNode(Vector2 pos, Vector2 size) : base("Display Node: ", pos, size)
 {
     _node = new DisplayNode(null);
     _in   = new UIInConnectionPoint(new Rect(Rect.position, new Vector2(50, 50)), Connect);
 }