Esempio n. 1
0
        public void ExecAuto(Action callback)
        {
            MessageUIManager uiManger = diabox.GetComponent <MessageUIManager>();

            switch (operate)
            {
            case OperateMode.Set:
                uiManger.InitDialogBox(filename, color, pos, size);
                uiManger.InitDialogLabel(rect.x, rect.y, rect.z, rect.w);
                callback();
                break;

            case OperateMode.Show:
                if (isopen)
                {
                    uiManger.Open(time, callback);
                }
                else
                {
                    uiManger.Close(time, callback);
                }
                break;

            default:
                break;
            }
        }
Esempio n. 2
0
        private void Clear()
        {
            MessageUIManager uiManager = diabox.GetComponent <MessageUIManager>();

            uiManager.ClearText();
        }
Esempio n. 3
0
        public void ExecAuto(Action callback)
        {
            MessageUIManager uiManager = diabox.GetComponent <MessageUIManager>();
            SoundManager     sm        = GameObject.Find("GameManager").GetComponent <SoundManager>();

            //判断是否在打字途中点击第二下
            if (uiManager.IsTyping())
            {
                //通过UIManager执行打字结束操作
                uiManager.FinishType();
                //当前模块结束
                finish = true;
            }
            else
            {
                HistoryManager hm = GameObject.Find("GameManager").GetComponent <HistoryManager>();
                hm.AddToTable(new BacklogText(name, dialog, voice, avatar));
                hm.SetCurrentText(name, dialog);

                if (l2dmouth == -1)
                {
                    sm.SetVoice(voice);
                }
                else
                {
                    // liv2d口型部分
                    ImageManager im = GameObject.Find("GameManager").GetComponent <ImageManager>();
                    sm.SetVoiceWithLive2d(voice, im.GetLive2dObject(0));
                }
                //通过UIManager设置文字,并开启打字机
                Debug.Log(operate);
                switch (operate)
                {
                case OperateMode.Line:
                    uiManager.ClearText();
                    uiManager.SetText(this, dialog, name, avatar);
                    //未结束等待打字机
                    finish = false;
                    break;

                case OperateMode.PageLine:
                    uiManager.HideNextIcon();
                    uiManager.AddText(this, dialog);
                    //未结束等待打字机
                    finish = false;
                    break;

                case OperateMode.LineFeed:
                    uiManager.LineFeed();
                    finish = true;
                    callback();
                    break;

                case OperateMode.ClearPage:
                    uiManager.ClearText();
                    // 已经执行完毕
                    finish = true;
                    callback();
                    break;
                }
            }
        }