diff --git a/Assets/_Scripts/Application/daoNiaoShu/UI/SpeakPanel.cs b/Assets/_Scripts/Application/daoNiaoShu/UI/SpeakPanel.cs index 237ed82..4257f21 100644 --- a/Assets/_Scripts/Application/daoNiaoShu/UI/SpeakPanel.cs +++ b/Assets/_Scripts/Application/daoNiaoShu/UI/SpeakPanel.cs @@ -52,7 +52,8 @@ namespace DongWuYiXue.DaoNiaoShu UIBehaviourExtension.OnEventButtonEvent(Voice.gameObject, EventTriggerType.PointerUp, onMicrophoneUp); userInput.onValidateInput += OnValidateInput; Send.onClick.AddListener(Submit); - tip.onClick.AddListener(() => { + tip.onClick.AddListener(() => + { userInput.text = tipTxt; clickTip = true; }); @@ -79,7 +80,8 @@ namespace DongWuYiXue.DaoNiaoShu { btnsContent.SetActive(false); userInput.readOnly = true; - ChatAI.Instance.SendData("用户处于," + stepName + ",用户口述了" + userInput.text + ",请你判断,正确返回true,错误返回false", str => { + ChatAI.Instance.SendData("用户处于," + stepName + ",用户口述了" + userInput.text + ",请你判断,正确返回true,错误返回false", str => + { if (str.Contains("true")) { if (clickTip) @@ -90,7 +92,8 @@ namespace DongWuYiXue.DaoNiaoShu } else { - GameManager.Instance.kaoheManager.AddScore(score, id, (s, t) => { + GameManager.Instance.kaoheManager.AddScore(score, id, (s, t) => + { GameManager.Instance.uiManager.GetUI().SetScore(s.ToString(), t.ToString()); }); Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = true }); @@ -103,8 +106,10 @@ namespace DongWuYiXue.DaoNiaoShu Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = false }); if (MVC.GetModel().modeType == ModeType.ShiXun) { - Game.Instance.IEnumeratorManager.Run(0.1f, () => { - ChatUI.Instance.SendAINext("用户处于," + stepName + ",请你对用户口述内容进行解析,并且介绍本步骤的答案和意义", () => { + Game.Instance.IEnumeratorManager.Run(0.1f, () => + { + ChatUI.Instance.SendAINext("用户处于," + stepName + ",请你对用户口述内容进行解析,并且介绍本步骤的答案和意义", () => + { userInput.text = tipTxt; sendAction?.Invoke(false); }); @@ -115,7 +120,7 @@ namespace DongWuYiXue.DaoNiaoShu sendAction?.Invoke(false); } } - else if (str.Contains("error")) + else if (str.Contains("error") || string.IsNullOrEmpty(str)) { GameManager.Instance.fsm.AddScore(0, id); userInput.text = tipTxt; @@ -132,7 +137,8 @@ namespace DongWuYiXue.DaoNiaoShu public void ShowSpeakPanel(string stepName, string tipTxt, Vector2 v, int delayShowTime, int id, int score, Action callBack) { - coroutine = Game.Instance.IEnumeratorManager.Run((int)delayShowTime, () => { + coroutine = Game.Instance.IEnumeratorManager.Run((int)delayShowTime, () => + { this.id = id; this.tipTxt = tipTxt; this.score = score; @@ -172,7 +178,8 @@ namespace DongWuYiXue.DaoNiaoShu inputContent.SetActive(true); MicrophoneImg.SetActive(false); transform.FindFirst("boxing").enabled = false; - ChatAI.Instance.StopRecord(str => { + ChatAI.Instance.StopRecord(str => + { userInput.text += str; }); } diff --git a/msc/2aae4e51c4e2dd03beb0e4c8c8d7affe/kivw.dat b/msc/2aae4e51c4e2dd03beb0e4c8c8d7affe/kivw.dat index e39c560..c3afd2c 100644 Binary files a/msc/2aae4e51c4e2dd03beb0e4c8c8d7affe/kivw.dat and b/msc/2aae4e51c4e2dd03beb0e4c8c8d7affe/kivw.dat differ