Пример #1
0
        public ModWindUp()
        {
            InitialRate.BindValueChanged(val =>
            {
                if (val.NewValue >= FinalRate.Value)
                    FinalRate.Value = val.NewValue + FinalRate.Precision;
            });

            FinalRate.BindValueChanged(val =>
            {
                if (val.NewValue <= InitialRate.Value)
                    InitialRate.Value = val.NewValue - InitialRate.Precision;
            });
        }
Пример #2
0
        public ModWindDown()
        {
            InitialRate.BindValueChanged(val =>
            {
                if (val.NewValue <= FinalRate.Value)
                {
                    FinalRate.Value = val.NewValue - FinalRate.Precision;
                }
            });

            FinalRate.BindValueChanged(val =>
            {
                if (val.NewValue >= InitialRate.Value)
                {
                    InitialRate.Value = val.NewValue + InitialRate.Precision;
                }
            });
        }
Пример #3
0
 protected ModTimeRamp()
 {
     // for preview purpose at song select. eventually we'll want to be able to update every frame.
     FinalRate.BindValueChanged(val => applyRateAdjustment(1), true);
     AdjustPitch.BindValueChanged(applyPitchAdjustment);
 }