Ejemplo n.º 1
0
    public SentanceObject getNextSentance()
    {
        string str;

        if (!hasNextSentance())
        {
            str = "...";
        }
        else
        {
            str = (string)sentances [sentance];
        }
        sentance++;
        SentanceObject obj = new SentanceObject();

        obj.content = string.Format(str, formatter);
        obj.content = obj.content.Replace("<To>", toReplace).Replace("<From>", fromReplace);
        if (isperson1)
        {
            obj.textColor = person1;
            obj.Alignment = "left";
        }
        else
        {
            obj.textColor = person2;
            obj.Alignment = "right";
        }
        return(obj);
    }
Ejemplo n.º 2
0
    IEnumerator sendConversationTapped()
    {
        Debug.Log("Started new sendConversation()");
        bool hasnext = curconvTapped.hasNextSentance();

        //Debug.Log("HasNext: " + hasnext);
        while (hasnext)
        {
            if (!txtwritetapped.speaking && hasnext)
            {
                SentanceObject sent = curconvTapped.getNextSentance();
                hasnext = curconvTapped.hasNextSentance();
                Debug.Log("[conversation-tapped]" + sent.content);
                txtwritetapped.Say(sent.content, sent.textColor, sent.Alignment);
            }
            yield return(new WaitForFixedUpdate());
        }
    }
Ejemplo n.º 3
0
    IEnumerator sendConversation()
    {
        Debug.Log("Started new sendConversation()");
        bool hasnext = curconvNormal.hasNextSentance();

        //Debug.Log("HasNext: " + hasnext);
        while (hasnext)
        {
            if (!txtwrite.speaking && hasnext)
            {
                //Debug.Log("sendConversation():"+curconv);
                SentanceObject sent = curconvNormal.getNextSentance();
                hasnext = curconvNormal.hasNextSentance();
                Debug.Log("[conversation-normal]" + sent.content);
                //curconv.getNextSentance().content = string.Format(curconv.getNextSentance().content,curconv.t);
                //curconv.reset();
                txtwrite.Say(sent.content, sent.textColor, sent.Alignment);
            }
            yield return(new WaitForFixedUpdate());
        }
        //Debug.Log("NO LONGER IN CONVERSATION");
        //curconv = null;
    }