示例#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());
    }