void onInputTypeChanged(bool wasInput, bool isInput)
        {
            string removeName = (IsInput) ? "OUT" : "IN";
            var    pin        = PinCollection.Get(removeName);

            if (pin != null)
            {
                Pin.Disconnect(pin);
            }

            PinCollection.Clear();
            if (IsInput)
            {
                PinCollection.AddInTransition("IN");
            }
            else
            {
                PinCollection.AddOutTransition("OUT");
            }
        }
        protected override void OnInit()
        {
            PinCollection.AddInTransition("IN");
            PinCollection.AddInput("Value", typeof(int));

            WeightData w1 = new WeightData()
            {
                VariableName = "Weight_0", OutputName = "Weight_0"
            };

            Variables.Add(w1.VariableName, 1, "Input");
            PinCollection.AddOutTransition(w1.OutputName);
            Weights.Add(w1);

            WeightData w2 = new WeightData()
            {
                VariableName = "Weight_1", OutputName = "Weight_1"
            };

            Variables.Add(w2.VariableName, 3, "Input");
            PinCollection.AddOutTransition(w2.OutputName);
            Weights.Add(w2);
        }
Exemple #3
0
 protected override void OnInit()
 {
     PinCollection.AddInput("Condition", typeof(bool));
     PinCollection.AddOutTransition("True");
     PinCollection.AddOutTransition("False");
 }