IEnumerator DelayEndLevel() { yield return(new WaitForSeconds(4f)); if (levelEnd == false) { endLevelAnim.SetTrigger("FadeIn"); FadeOutBGM fadeOutBGMScript = mainCamera.GetComponent <FadeOutBGM>(); fadeOutBGMScript.FadeOut(); yield return(new WaitForSeconds(6f)); dialogueTrigger.SetActive(true); } }
private void Start() { fadeOutBGMScript = mainCamera.GetComponent <FadeOutBGM>(); }