Exemple #1
0
        public void Stop()
        {
            var current = m_CurrentSpeed;
            var target  = 0.0f;

            void WindDown(float t)
            {
                CurrentSpeed = Mathf.Lerp(current, target, t);
            }

            StartCoroutine(CoroutineUtility.InvokeOverTimeNormalized(WindDown, windDownDuration));
        }
Exemple #2
0
        public void Run()
        {
            var current = 0.0f;
            var target  = startSpeed;

            void WindUp(float t)
            {
                CurrentSpeed = Mathf.Lerp(current, target, t);
            }

            StartCoroutine(CoroutineUtility.InvokeOverTimeNormalized(WindUp, windUpDuration));
        }