using System; using DG.Tweening; using UnityEngine; using UnityEngine.UI; namespace Panels { public class LoadingPanel : PanelBase { [SerializeField] private Image loadProgress; private Tween _tween; public void UpdateProgress(float inProgress, Action onComplete = null) { _tween?.Kill(); _tween = loadProgress.DOFillAmount(inProgress, .25f) .OnComplete(() => onComplete?.Invoke()); } } }