コード例 #1
0
    //	void AssignText(){
    //		conversations[0] = "Please don't eat me. \n I can sell you something.";
    //		conversations[1] = "What are you going to give me?";
    //		conversations[2] = "I can give you some apples.";
    //		conversations[3] = "Should I accept apples?";
    //	}

    IEnumerator Talk()
    {
        for (int i = 0; i < conversations.Length - 1; i++)
        {
            int nIcon = i % icons.Length;
            dialogue.Speak(icons [nIcon], conversations [i]);
            yield return(new WaitUntil(() => spaceAccepted));

            spaceAccepted = false;
        }
        int lastIcon = (conversations.Length - 1) % icons.Length;

        dialogue.Choice(icons [lastIcon], conversations [conversations.Length - 1], BuyApple, EatPrincess);
        inConveration = false;
        yield return(new WaitUntil(() => spaceAccepted));
    }