IEnumerator QuitGame() { fadingScreen.gameObject.SetActive(true); fadeOut = true; StartCoroutine(GM.AudioFadeOut(Bgm, fadingTime)); yield return(new WaitForSeconds(fadingTime)); fadeOut = false; Application.Quit(); }
public IEnumerator ChangeToMonsterBgm() { StartCoroutine(GM.AudioFadeOut(Bgm, fadingTime)); StartCoroutine(GM.AudioFadeIn(monsterBgm, fadingTime)); yield return(new WaitForSeconds(fadingTime)); }