Example #1
0
        private static void UpdateSliderSubscription(PushupSlider slider, float value, Action <float> action)
        {
            slider.onUpdate = f =>
            {
                action(f);
                _pushUpController.RecalculateBody(false);
            };

            var pushObserver = Observer.Create <float>(f => slider.Update(f));

            slider.MakerSlider.ValueChanged.Subscribe(pushObserver);
            slider.MakerSlider.SetValue(value);
        }