GameOverScreen.SlowTimeDown C# (CSharp) Method

SlowTimeDown() public method

public SlowTimeDown ( ) : IEnumerator
return IEnumerator
    public IEnumerator SlowTimeDown()
    {
        float s = Time.realtimeSinceStartup;
        float n = s;
        while(((n - s) < 3.0f) && enabled) {
          n = Time.realtimeSinceStartup;
          Time.timeScale = Mathf.Lerp(1f, 0f, Mathf.Clamp01(n-s));
          yield return new WaitForEndOfFrame();
        }
        Time.timeScale = 0f;
    }