From 75eb52117661825d21feae22aaa7732af74c0605 Mon Sep 17 00:00:00 2001 From: gaoduo <1453062510@qq.com> Date: Thu, 14 May 2026 10:37:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=91=BC=E5=8F=AB=E5=B0=8F?= =?UTF-8?q?=E6=99=BA=E5=B0=8F=E6=99=BA=E6=B2=A1=E6=9C=89=E5=8F=8D=E5=BA=94?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/SenSorSystem/AudioSensor.cs | 6 +++++- Assets/SenSorSystem/ZhuSheQi_5SenSor.cs | 4 ++-- .../SensorModule/Scripts/SensorManager.cs | 1 + Assets/_Scenes/QiGuanChaGuan.unity | 20 +++---------------- .../FSMManager/State/ShuZheZhunBeiState.cs | 2 +- .../UI/ImgSelectQuestionPanelTwo.cs | 8 ++++++++ 6 files changed, 20 insertions(+), 21 deletions(-) diff --git a/Assets/SenSorSystem/AudioSensor.cs b/Assets/SenSorSystem/AudioSensor.cs index e35c157..cbfde00 100644 --- a/Assets/SenSorSystem/AudioSensor.cs +++ b/Assets/SenSorSystem/AudioSensor.cs @@ -6,10 +6,14 @@ using UnityEngine; public class AudioSensor : Sensor { + private void Start() + { + transform.parent.GetComponent().SendFunction("+++"); + } public override void ReceiveData(string datas, SerialPort sp = null) { base.ReceiveData(datas, sp); - //this.Log(datas); + this.Log(datas); if (datas.Contains("hello")) { ChatUI.Instance.xunFeiWakeup.callBack?.Invoke(); diff --git a/Assets/SenSorSystem/ZhuSheQi_5SenSor.cs b/Assets/SenSorSystem/ZhuSheQi_5SenSor.cs index 9be9d42..06c2a66 100644 --- a/Assets/SenSorSystem/ZhuSheQi_5SenSor.cs +++ b/Assets/SenSorSystem/ZhuSheQi_5SenSor.cs @@ -52,11 +52,11 @@ public class ZhuSheQi_5SenSor : Sensor isOpen = false; //progressValue = 0; } - txt.text = $"10ml注射器开启:{isOpen}拉取进度:{progressValue}"; + txt.text = $"5ml注射器开启:{isOpen}拉取进度:{progressValue}"; } public override void Display(string datas) { base.Display(datas); - txt.text = $"5ml注射器拉取进度:{progressValue}"; + } } diff --git a/Assets/Third/SensorModule/Scripts/SensorManager.cs b/Assets/Third/SensorModule/Scripts/SensorManager.cs index a2be23a..a0ac3eb 100644 --- a/Assets/Third/SensorModule/Scripts/SensorManager.cs +++ b/Assets/Third/SensorModule/Scripts/SensorManager.cs @@ -443,6 +443,7 @@ public class SensorManager : MonoBehaviour /*MonoSingleton*/ SerialPort sp = serialPorts[i]; if (sp != null && !sp.IsOpen) { + sp.RtsEnable = true; sp.Open(); Debug.Log($"串口 {sp.PortName} 打开成功"); } diff --git a/Assets/_Scenes/QiGuanChaGuan.unity b/Assets/_Scenes/QiGuanChaGuan.unity index 98f1ce7..c55accc 100644 --- a/Assets/_Scenes/QiGuanChaGuan.unity +++ b/Assets/_Scenes/QiGuanChaGuan.unity @@ -72154,7 +72154,7 @@ GameObject: - component: {fileID: 1227381981} - component: {fileID: 1227381980} - component: {fileID: 1227381983} - m_Layer: 0 + m_Layer: 8 m_Name: cm m_TagString: Untagged m_Icon: {fileID: 0} @@ -90333,9 +90333,8 @@ GameObject: m_Component: - component: {fileID: 1674787392} - component: {fileID: 1674787393} - - component: {fileID: 1674787394} - m_Layer: 0 - m_Name: "\u672F\u8005\u51C6\u5907_Camera" + m_Layer: 8 + m_Name: "\u672F\u8005\u51C6\u59071_Camera" m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -90395,19 +90394,6 @@ MonoBehaviour: m_Calls: [] m_LegacyBlendHint: 0 m_ComponentOwner: {fileID: 1227381979} ---- !u!114 &1674787394 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1674787391} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 98bbc2c1e63e98543830eec78d976795, type: 3} - m_Name: - m_EditorClassIdentifier: - serializedGuid: c7f6a3502b5617449d268446788d7a66 --- !u!114 &1674858816 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/_Scripts/Application/QiGuanChaGuan/FSMManager/State/ShuZheZhunBeiState.cs b/Assets/_Scripts/Application/QiGuanChaGuan/FSMManager/State/ShuZheZhunBeiState.cs index 6b10fad..e26c049 100644 --- a/Assets/_Scripts/Application/QiGuanChaGuan/FSMManager/State/ShuZheZhunBeiState.cs +++ b/Assets/_Scripts/Application/QiGuanChaGuan/FSMManager/State/ShuZheZhunBeiState.cs @@ -8,7 +8,7 @@ namespace DongWuYiXue.QiGuanChaGuan { base.OnStateEnter(); this.Log("进入术者准备状态"); - fsm.ShowCamera("术者准备_Camera"); + fsm.ShowCamera("术者准备1_Camera"); fsm.ShowTip(0); fsm.PlayBgm(0); if (fsm.main_gameModel.modeType == ModeType.ShiXun) diff --git a/Assets/_Scripts/Application/QiGuanChaGuan/UI/ImgSelectQuestionPanelTwo.cs b/Assets/_Scripts/Application/QiGuanChaGuan/UI/ImgSelectQuestionPanelTwo.cs index 82ffa90..1f24871 100644 --- a/Assets/_Scripts/Application/QiGuanChaGuan/UI/ImgSelectQuestionPanelTwo.cs +++ b/Assets/_Scripts/Application/QiGuanChaGuan/UI/ImgSelectQuestionPanelTwo.cs @@ -29,6 +29,7 @@ namespace DongWuYiXue.QiGuanChaGuan public override void Init(IUIManager uictrl) { base.Init(uictrl); + imgSelectManagers = GetComponentsInChildren(true); nextBtn = transform.FindFirst