Exemplo n.º 1
0
    void AddCenterData(string content)
    {
        NarratorData dialogue = new NarratorData();

        dialogue.content = content;
        TextElement.AsyncGetSizeY("", new Vector2(780, 70), 28, new EmojiString(dialogue.content), FontStyle.Normal,
                                  (o) => {
            dialogue.contentSize = o;
            CenterLink.AddData(dialogue, o.y + 100);
            view.container.Move(o.y + 100);
        });
    }
Exemplo n.º 2
0
    void AddLeftData(string content)
    {
        DialogueData dialogue = new DialogueData();

        dialogue.name    = "配角";
        dialogue.content = content;
        TextElement.AsyncGetSizeY("", new Vector2(780, 70), 28, new EmojiString(dialogue.content), FontStyle.Normal,
                                  (o) => {
            dialogue.contentSize = o;
            float h = o.y + 70;
            if (h < 140)
            {
                h = 140;
            }
            LeftLink.AddData(dialogue, h);
            view.container.Move(h);
        });
    }