private IEnumerator StageProgressAnimation() { while (true) { if (currentProgress < targetProgress) { float delta = Mathf.Clamp(Time.unscaledDeltaTime, 0, 0.04f) * ProgressAnimationSpeed; currentProgress += delta; float nextFillAmount = FillStart + FillLength * (currentProgress - Mathf.Floor(currentProgress)); if (stageProgressFillImage.fillAmount > nextFillAmount) { GameManager.nextSlotsIsUpgradeSlots = true; if (!UIManager.PanelWhetherShowAnyone() && GameManager.WillShowSlots <= 0) { UIManager.ShowPopPanelByType(UI_Panel.UI_PopPanel.SlotsPanel); } else { GameManager.WillShowSlots++; } SetStageInfo(); GameManager.Instance.SpawnAGiftBall(); } stageProgressFillImage.fillAmount = nextFillAmount; } yield return(null); } }