/// <summary>
        /// Sends progress value via UnityEvents
        /// </summary>
        protected virtual void UpdateProgress()
        {
            if (!_setRealtimeProgressValueIsNull)
            {
                SetRealtimeProgressValue.Invoke(_loadProgress);
            }

            if (_interpolateProgress)
            {
                _interpolatedLoadProgress = MMMaths.Approach(_interpolatedLoadProgress, _loadProgress, Time.unscaledDeltaTime * _progressInterpolationSpeed);
                if (!_setInterpolatedProgressValueIsNull)
                {
                    SetInterpolatedProgressValue.Invoke(_interpolatedLoadProgress);
                }
            }
            else
            {
                SetInterpolatedProgressValue.Invoke(_loadProgress);
            }
        }
Пример #2
0
 /// <summary>
 /// Every frame, we fill the bar smoothly according to loading progress
 /// </summary>
 protected virtual void Update()
 {
     Time.timeScale = 1f;
     _progressBarImage.fillAmount = MMMaths.Approach(_progressBarImage.fillAmount, _fillTarget, Time.deltaTime * ProgressBarSpeed);
 }
Пример #3
0
 /// <summary>
 /// Every frame, we fill the bar smoothly according to loading progress
 /// </summary>
 protected virtual void Update()
 {
     LoadingProgressBar.GetComponent <Image>().fillAmount = MMMaths.Approach(LoadingProgressBar.GetComponent <Image>().fillAmount, _fillTarget, Time.deltaTime * ProgressBarSpeed);
 }