IEnumerator spawnCount(int money1, int money2, int money3) { AudioManager.PlaySound(AudioManager.Audio.rise01); for (int i = 1; i <= money1; ++i) { gameOverMenu.moneyTargetText1.text = i.ToString(); yield return(new WaitForSeconds(0.015f)); } AudioManager.PlaySound(AudioManager.Audio.rise02); for (int i = 1; i <= money2; ++i) { gameOverMenu.moneyTargetText2.text = i.ToString(); yield return(new WaitForSeconds(0.015f)); } AudioManager.PlaySound(AudioManager.Audio.rise03); for (int i = 1; i <= money3; ++i) { gameOverMenu.moneyTargetText3.text = i.ToString(); yield return(new WaitForSeconds(0.015f)); } AudioManager.PlaySound(AudioManager.Audio.rise04); int total = money1 + money2 + money3; for (int i = 1; i <= total; ++i) { gameOverMenu.moneyTotalText.text = i.ToString(); yield return(new WaitForSeconds(0.015f)); } Color32 gray = new Color32(255, 255, 255, 255); AdvertBtn.GetComponent <Button>().enabled = true; HomeBtn.GetComponent <Button>().enabled = true; LevelBtn.GetComponent <Button>().enabled = true; AdvertBtn.GetComponent <Image>().color = gray; HomeBtn.GetComponent <Image>().color = gray; LevelBtn.GetComponent <Image>().color = gray; }