private IEnumerator Sleep(HubPlayer player) { bool result = false; _questionText.SetQuestionText("セーブしますか?"); yield return(StartCoroutine(_questionText.Question(r => result = r))); if (result) { SaveData.instance.Save(); } _questionText.gameObject.SetActive(true); _questionText.SetQuestionText("タイトルに戻りますか?"); yield return(StartCoroutine(_questionText.Question(r => result = r))); if (result) { _fade.FadeOut(() => SceneManager.LoadScene("Title")); } else { player.ReturnRoom(Vector3.back); } }
private IEnumerator Departure(HubPlayer player) { bool result = false; _questionText.SetQuestionText("ダンジョンに挑戦しますか?"); yield return(StartCoroutine(_questionText.Question(r => result = r))); if (result) { SoundManager.instance.StopBGM(); _fade.FadeOut(() => SceneManager.LoadScene("Dungeon")); } else { player.ReturnRoom(Vector3.left); } }