修改呼叫小智小智没有反应的问题
This commit is contained in:
parent
ec22286b11
commit
75eb521176
@ -6,10 +6,14 @@ using UnityEngine;
|
|||||||
|
|
||||||
public class AudioSensor : Sensor
|
public class AudioSensor : Sensor
|
||||||
{
|
{
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
transform.parent.GetComponent<SensorManager>().SendFunction("+++");
|
||||||
|
}
|
||||||
public override void ReceiveData(string datas, SerialPort sp = null)
|
public override void ReceiveData(string datas, SerialPort sp = null)
|
||||||
{
|
{
|
||||||
base.ReceiveData(datas, sp);
|
base.ReceiveData(datas, sp);
|
||||||
//this.Log(datas);
|
this.Log(datas);
|
||||||
if (datas.Contains("hello"))
|
if (datas.Contains("hello"))
|
||||||
{
|
{
|
||||||
ChatUI.Instance.xunFeiWakeup.callBack?.Invoke();
|
ChatUI.Instance.xunFeiWakeup.callBack?.Invoke();
|
||||||
|
|||||||
@ -52,11 +52,11 @@ public class ZhuSheQi_5SenSor : Sensor
|
|||||||
isOpen = false;
|
isOpen = false;
|
||||||
//progressValue = 0;
|
//progressValue = 0;
|
||||||
}
|
}
|
||||||
txt.text = $"10ml注射器开启:{isOpen}拉取进度:{progressValue}";
|
txt.text = $"5ml注射器开启:{isOpen}拉取进度:{progressValue}";
|
||||||
}
|
}
|
||||||
public override void Display(string datas)
|
public override void Display(string datas)
|
||||||
{
|
{
|
||||||
base.Display(datas);
|
base.Display(datas);
|
||||||
txt.text = $"5ml注射器拉取进度:{progressValue}";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -443,6 +443,7 @@ public class SensorManager : MonoBehaviour /*MonoSingleton<SensorManager>*/
|
|||||||
SerialPort sp = serialPorts[i];
|
SerialPort sp = serialPorts[i];
|
||||||
if (sp != null && !sp.IsOpen)
|
if (sp != null && !sp.IsOpen)
|
||||||
{
|
{
|
||||||
|
sp.RtsEnable = true;
|
||||||
sp.Open();
|
sp.Open();
|
||||||
Debug.Log($"串口 {sp.PortName} 打开成功");
|
Debug.Log($"串口 {sp.PortName} 打开成功");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72154,7 +72154,7 @@ GameObject:
|
|||||||
- component: {fileID: 1227381981}
|
- component: {fileID: 1227381981}
|
||||||
- component: {fileID: 1227381980}
|
- component: {fileID: 1227381980}
|
||||||
- component: {fileID: 1227381983}
|
- component: {fileID: 1227381983}
|
||||||
m_Layer: 0
|
m_Layer: 8
|
||||||
m_Name: cm
|
m_Name: cm
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
@ -90333,9 +90333,8 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1674787392}
|
- component: {fileID: 1674787392}
|
||||||
- component: {fileID: 1674787393}
|
- component: {fileID: 1674787393}
|
||||||
- component: {fileID: 1674787394}
|
m_Layer: 8
|
||||||
m_Layer: 0
|
m_Name: "\u672F\u8005\u51C6\u59071_Camera"
|
||||||
m_Name: "\u672F\u8005\u51C6\u5907_Camera"
|
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@ -90395,19 +90394,6 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_LegacyBlendHint: 0
|
m_LegacyBlendHint: 0
|
||||||
m_ComponentOwner: {fileID: 1227381979}
|
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
|
--- !u!114 &1674858816
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@ -8,7 +8,7 @@ namespace DongWuYiXue.QiGuanChaGuan
|
|||||||
{
|
{
|
||||||
base.OnStateEnter();
|
base.OnStateEnter();
|
||||||
this.Log("进入术者准备状态");
|
this.Log("进入术者准备状态");
|
||||||
fsm.ShowCamera("术者准备_Camera");
|
fsm.ShowCamera("术者准备1_Camera");
|
||||||
fsm.ShowTip(0);
|
fsm.ShowTip(0);
|
||||||
fsm.PlayBgm(0);
|
fsm.PlayBgm(0);
|
||||||
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
||||||
|
|||||||
@ -29,6 +29,7 @@ namespace DongWuYiXue.QiGuanChaGuan
|
|||||||
public override void Init(IUIManager uictrl)
|
public override void Init(IUIManager uictrl)
|
||||||
{
|
{
|
||||||
base.Init(uictrl);
|
base.Init(uictrl);
|
||||||
|
|
||||||
imgSelectManagers = GetComponentsInChildren<ImgSelectManager>(true);
|
imgSelectManagers = GetComponentsInChildren<ImgSelectManager>(true);
|
||||||
nextBtn = transform.FindFirst<Button>("Next");
|
nextBtn = transform.FindFirst<Button>("Next");
|
||||||
nextBtn.onClick.AddListener(Next);
|
nextBtn.onClick.AddListener(Next);
|
||||||
@ -87,6 +88,13 @@ namespace DongWuYiXue.QiGuanChaGuan
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void Show()
|
||||||
|
{
|
||||||
|
base.Show();
|
||||||
|
rightAnswer = "";
|
||||||
|
}
|
||||||
|
|
||||||
private void Submit()
|
private void Submit()
|
||||||
{
|
{
|
||||||
Game.Instance.sound.StopBGM();
|
Game.Instance.sound.StopBGM();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user