Beispiel #1
0
        public NumberInputNode() : base(new ExternalNumberOperator())
        {
            //Source.Data = new PNumber(15);
            var d   = new ExternalNumber(15);
            var ext = new ExternalData(d);

            Source.ConnectToData(new List <ExternalData>()
            {
                ext
            });
            d.RequestChange(15);
        }
Beispiel #2
0
        public static void GraphTest()
        {
            var n      = new AddNode();
            var n2     = new NumberInputNode();
            var numer  = 152.2;
            var exNum  = new ExternalNumber(numer);
            var exData = new ExternalData(exNum);

            n2.ConnectToData(new List <ExternalData>()
            {
                exData
            });

            Print(n2.OutputSockets[0].Data);
            exNum.RequestChange(130);
            Print(n2.OutputSockets[0].Data);

            n.InputSockets[0].ConnectTo(n2.OutputSockets[0]);
        }