예제 #1
0
    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;
        }
    }
예제 #2
0
파일: Inn.cs 프로젝트: bmjoy/Unity2DRPG
    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;
    }
예제 #3
0
    public int ChoiceResult()
    {
        ChoiceWindow choice = MessageSystem.GetChoise();

        return(choice.Result());
    }