private IEnumerator DelaySetTexts(float time, int remainingStar) { yield return(new WaitForSeconds(time)); if (PlayerPrefsManager.GetDailyProcess() < totalKeys) { PlayerPrefsManager.SetDailyProcess(PlayerPrefsManager.GetDailyProcess() + 1); } float perc = (float)PlayerPrefsManager.GetDailyProcess() / (float)totalKeys; StartCoroutine(FugoUtils.FillImage(perc, 0.2f, normalImg)); StartCoroutine(FugoUtils.FillImage(perc, 0.2f, bar)); Vector2 sizeDelta = bar.GetComponent <RectTransform>().sizeDelta; StartCoroutine(FugoUtils.Mover(new Vector3(-370f + sizeDelta.x * perc, 0f, 0f), 0.2f, keyText.transform)); keyText.text = PlayerPrefsManager.GetDailyProcess().ToString(); gainedStarText.text = remainingStar.ToString(); if (PlayerPrefsManager.GetDailyProcess() >= totalKeys) { PlayerPrefsManager.SetCoin(PlayerPrefsManager.GetCoin() + 5); } SoundManager.instance.CoinIncrease(); yield return(new WaitForSeconds(0.2f)); MenuController.instance.IncreaseCoinAnim(0f); }