private IEnumerator StartAnimation() { for (int i = 0; i < image.Length; i++) { my.sprite = image[i]; yield return(new WaitForSeconds(animationSpeed)); } fade.Alpha(1); quest.SetActive(true); }
IEnumerator EndGame() { yield return(new WaitForSeconds(1.0f)); fade.Alpha(1.0f); popUp.SetActive(true); questItem.sprite = GameManager.instance.itemManager.endItem[GameManager.instance.questNum]; text.text = "" + GameManager.instance.itemManager.moneyList[GameManager.instance.questNum]; GameManager.instance.money += GameManager.instance.itemManager.moneyList[GameManager.instance.questNum]; PlayerPrefs.SetInt("Money", GameManager.instance.money); GameManager.instance.itemManager.Set(); box.SetActive(false); }