Exemplo n.º 1
0
        protected override void OnConfigPinChanged()
        {
            var currposecount = Pins.InputPins.Count / 2;

            if (currposecount < FPoseCount[0])
            {
                for (int i = currposecount; i < FPoseCount[0]; i++)
                {
                    Pins.AddInput(typeof(ISkeleton), new InputAttribute($"Pose {i}")
                    {
                        Order = i * 2
                    }, obj: i);
                    Pins.AddInput(typeof(double), new InputAttribute($"Amount {i}")
                    {
                        Order        = i * 2 + 1,
                        DefaultValue = 1
                    }, obj: i);
                }
            }
            if (currposecount > FPoseCount[0])
            {
                for (int i = FPoseCount[0]; i < currposecount; i++)
                {
                    Pins.RemoveInput($"Amount {i}");
                    Pins.RemoveInput($"Pose {i}");
                }
            }
        }