Example #1
0
    internal void QueueSlowdown(float timeScale, float duration)
    {
        if (_currentSlowdown != null)
        {
            _currentSlowdown.TimeScale = timeScale;
            _currentSlowdown.SetDuration(duration);
        }
        else
        {
            _currentSlowdown = new SlowDown(duration, timeScale);
        }

        SetNewTimeScale(_currentSlowdown.TimeScale);
        EnableTimeDisplayCallback.Invoke(true);
        UpdateTimeDisplayCallback.Invoke(_currentSlowdown.DurationProcentage);
    }