Пример #1
0
    static IEnumerator ShowList(NpcDialog dia, IList <string> text, System.Action cb)
    {
        bool next = false;

        dia.ShowNext = delegate()
        {
            next = true;
        };

        foreach (var t in text)
        {
            //dia.ShowText(string.Format(t, ObjectManager.objectManager.GetMyName()));
            dia.ShowText(t);
            while (!next)
            {
                yield return(new WaitForSeconds(0.1f));
            }
            next = false;
        }
        WindowMng.windowMng.PopView();
        if (cb != null)
        {
            cb();
        }
    }