Esempio n. 1
0
    protected void Start()
    {
        m_slider = GetComponent <Slider>();
        IReadOnlyReactiveProperty <float> property = GetProperty <float>();

        m_slider.value = property.Value;
        property.Delay(TimeSpan.FromSeconds(0.5)).Subscribe(delegate(float target)
        {
            m_delta = target - m_slider.value;
            if (coro != null)
            {
                SceneLoader.Instance.StopCoroutine(coro);
            }
            coro = SceneLoader.Instance.StartCoroutine(StepRoutine(target));
        }).AddTo(this);
    }