public void Choice(string c1, string c2) { StartCoroutine(Choise()); IEnumerator Choise() { ChoiceWindow choice = MessageSystem.GetChoise(); yield return(choice.Choice(c1, c2)); LuaScript.instance.Resume(); yield break; } }
public IEnumerator Talk() { MessageWindow messageWindow = MessageSystem.GetWindow(); ChoiceWindow choiceWindow = MessageSystem.GetChoise(); InteractableStart(); yield return(StartCoroutine(messageWindow.ShowClick("ひと晩" + roomCharge + "ゴールドですが\nおとまりになられますか"))); yield return(StartCoroutine(choiceWindow.Choice())); int choiceResult = choiceWindow.Result(); if (choiceResult == 1) { if (GameController.Instance.money <= 0) { yield return(StartCoroutine(messageWindow.ShowClick("お金が たりないようです"))); messageWindow.Close(); InteractableEnd(); yield break; } yield return(StartCoroutine(messageWindow.ShowClick("それでは ごゆっくり おやすみください"))); GameController.Instance.money -= roomCharge; Stay(); yield return(StartCoroutine(SceneFader.FadeSceneOut())); yield return(StartCoroutine(SceneFader.FadeSceneIn())); yield return(StartCoroutine(messageWindow.ShowClick("おはようございます。ではいってらっしゃいませ"))); } else { yield return(StartCoroutine(messageWindow.ShowClick("お気をつけて 旅をつづけられますように"))); } messageWindow.Close(); InteractableEnd(); yield break; }