最新修改

This commit is contained in:
高铎 2026-04-10 17:36:55 +08:00
parent 1f1dea25f6
commit 041a4a01ff
47 changed files with 199 additions and 136 deletions

View File

@ -37,8 +37,8 @@ public class ZhuSheQi_20SenSor : Sensor
return;
}
lastTime = time;
//this.Error(datas);
progressValue = ((Convert.ToInt32(datas.Split("%")[0].Split("LEVEL:")[1])) - 1) / 9.0f;
//this.Error(datas.Split("%")[0].Split("LEVEL:")[1]);
progressValue = (float)double.Parse(datas.Split("%")[0].Split("LEVEL:")[1]) / 10.0f;
//this.Error($"当前20ml注射器的进度为{progressValue}");
}

View File

@ -20,7 +20,7 @@ public class DaoNiao_Sensor : Sensor
if (!data.Contains("DWYX2")) return;
if (data.Contains("DNDeep"))
{
daoNiaoDeep = float.Parse(data.Split(",")[3].Split(":")[1].Split("mm")[0]);
daoNiaoDeep = float.Parse(data.Split(",")[4].Split(":")[1].Split("mm")[0]);
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: c8d991d9f4adfb54499c95a54b18de25
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: e15728b427d777e4abbf594af56c6e14
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: e35c78b3e389e844ea6c24b40fad52c5
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 42d4fa256c5848d45a53a6524bfe2d50
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: ad1da70be649f0d43bb79dcc1935380b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 4654736ee4a023b4cbef01f5ec4aceaa
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: f76ad67ebe4030f469c699098a8199cc
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: a48a470d8b09f324492de1c5eb4e22af
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 460d165ee0d3f5b4a9b341d63a665d8b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 6a35de43f44092b4dac405508b5f5a41
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: ece70af9d4796c94e93c7269732c2443
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: ed94eec2d75a3a74d928310945336cec
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: f6d2b23a3c0e28e49a9d2125251c6e54
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,88 @@
using NAudio.Wave;
using System;
using System.IO;
using System.IO.Ports;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using UnityEngine;
using UnityThreadingUtils;
/// <summary>
/// 语音工具
/// </summary>
public class ZXKWakeup : MonoBehaviour
{
//唤醒词:小智小智
#region ,
[Header("串口名")]
public string portName = "COM10";
[Header("波特率")]
public int baudRate = 115200;
[Header("奇偶校验")]
private Parity parity = Parity.None;
[Header("数据位")]
private int dataBits = 8;
[Header("停止位")]
private StopBits stopBits = StopBits.One;
SerialPort sp = null;
Thread dataReceiveThread;
#endregion
StringBuilder sb = new StringBuilder();
public Action callBack;//唤醒回调
private void Start()
{
//sp = new SerialPort(portName, baudRate, parity, dataBits, stopBits);
//dataReceiveThread = new Thread(new ThreadStart(DataReceiveStrThread));
//try
//{
// if (!sp.IsOpen)
// {
// sp.Open();
// dataReceiveThread.Start();
// Debug.Log("串口打开成功");
// }
//}
//catch (Exception e)
//{
// Debug.Log("串口打开失败" + e.ToString());
//}
}
/// <summary>
/// 接收字符串
/// </summary>
private void DataReceiveStrThread()
{
while (true)
{
if (sp != null && sp.IsOpen)
{
try
{
if (sp.BytesToRead > 0)
{
sb.Append(sp.ReadExisting());
UnityMainThreadDispatcher.Instance().Enqueue(() =>
{
Debug.Log("before="+sb.ToString().TrimEnd('\n', '\r'));
if (sb.ToString().TrimEnd('\n', '\r') == "hello")
{
callBack?.Invoke();
}
sb.Clear();
Debug.Log("after="+sb.ToString());
});
}
}
catch (Exception)
{
Debug.Log("消息接收失败");
}
}
Thread.Sleep(20);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dcf191a1716598d4db17d1de3d151578
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -2526,10 +2526,25 @@ PrefabInstance:
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9a2702ac93ccb6740b46227ae3c73a0b,
type: 3}
propertyPath: m_LocalScale.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9a2702ac93ccb6740b46227ae3c73a0b,
type: 3}
propertyPath: m_LocalScale.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9a2702ac93ccb6740b46227ae3c73a0b,
type: 3}
propertyPath: m_LocalScale.z
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9a2702ac93ccb6740b46227ae3c73a0b,
type: 3}
propertyPath: m_LocalPosition.x
value: -0.0018000007
value: -0.12650004
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9a2702ac93ccb6740b46227ae3c73a0b,
type: 3}
@ -2539,7 +2554,7 @@ PrefabInstance:
- target: {fileID: -8679921383154817045, guid: 9a2702ac93ccb6740b46227ae3c73a0b,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.12650001
value: -0.0017999411
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9a2702ac93ccb6740b46227ae3c73a0b,
type: 3}
@ -2549,22 +2564,22 @@ PrefabInstance:
- target: {fileID: -8679921383154817045, guid: 9a2702ac93ccb6740b46227ae3c73a0b,
type: 3}
propertyPath: m_LocalRotation.x
value: -0.7071068
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9a2702ac93ccb6740b46227ae3c73a0b,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9a2702ac93ccb6740b46227ae3c73a0b,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9a2702ac93ccb6740b46227ae3c73a0b,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -90
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9a2702ac93ccb6740b46227ae3c73a0b,
type: 3}
@ -2574,7 +2589,7 @@ PrefabInstance:
- target: {fileID: -8679921383154817045, guid: 9a2702ac93ccb6740b46227ae3c73a0b,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
value: -90
objectReference: {fileID: 0}
- target: {fileID: -3776296796519553544, guid: 9a2702ac93ccb6740b46227ae3c73a0b,
type: 3}
@ -65581,6 +65596,52 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
serializedGuid: 1b5e6487fb690a4294916291c32ab2e8
--- !u!1 &612443803
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 612443804}
- component: {fileID: 612443805}
m_Layer: 8
m_Name: ZXKWakeup
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &612443804
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 612443803}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2259895072460255273}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &612443805
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 612443803}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dcf191a1716598d4db17d1de3d151578, type: 3}
m_Name:
m_EditorClassIdentifier:
portName: COM10
baudRate: 115200
--- !u!114 &612659581
MonoBehaviour:
m_ObjectHideFlags: 0
@ -74978,7 +75039,7 @@ Transform:
- {fileID: 499140760}
- {fileID: 1314435792}
m_Father: {fileID: 1841473156}
m_RootOrder: 18
m_RootOrder: 16
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &778573558
MonoBehaviour:
@ -116573,7 +116634,7 @@ PrefabInstance:
- target: {fileID: -8679921383154817045, guid: edc4d8f2c8ccf82449b64aaf2e7da487,
type: 3}
propertyPath: m_RootOrder
value: 16
value: 17
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: edc4d8f2c8ccf82449b64aaf2e7da487,
type: 3}
@ -132774,7 +132835,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1467340740}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.4756, y: 0.84660006, z: 1.7593}
m_LocalPosition: {x: 0.5647, y: 0.8603, z: 1.8405}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -167046,9 +167107,9 @@ Transform:
- {fileID: 7772055826254046400}
- {fileID: 843046133711145432}
- {fileID: 1467340741}
- {fileID: 778573557}
- {fileID: 1189915995}
- {fileID: 2113228453}
- {fileID: 778573557}
m_Father: {fileID: 2445884766250584625}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -190848,7 +190909,7 @@ PrefabInstance:
- target: {fileID: -8679921383154817045, guid: 6962ca330ec8aa64f8fb34bae26742be,
type: 3}
propertyPath: m_RootOrder
value: 17
value: 18
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 6962ca330ec8aa64f8fb34bae26742be,
type: 3}
@ -193870,7 +193931,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &243101975873686439
MonoBehaviour:
m_ObjectHideFlags: 0
@ -215981,6 +216042,7 @@ Transform:
- {fileID: 8128769653983033852}
- {fileID: 4453884449976785875}
- {fileID: 7171216208228655918}
- {fileID: 612443804}
m_Father: {fileID: 8658819022020993032}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View File

@ -43,7 +43,7 @@ namespace DongWuYiXue.DaoNiaoShu
avProValue.PlayValue = chaGuanValue;
avProValue.PlayVideoAsValue();
}
if (isChaGuan && GameManager.Instance.senSor.GetSensor<DaoNiao_Sensor>().daoNiaoDeep > 45f)
if (isChaGuan && GameManager.Instance.senSor.GetSensor<DaoNiao_Sensor>().daoNiaoDeep > 20f)
{
chaGuanValue = 1.0f;
fsm.PlayClip("²å¹Ü_TimeLine", null, chaGuanValue);

View File

@ -16,6 +16,7 @@ namespace DongWuYiXue.DaoNiaoShu
xiaoDu = GameManager.Instance.transform.parent.FindFirst<XiaoDu_Collider>("pasted__pasted__SM_MianQiu7");
nieZi = GameManager.Instance.transform.parent.FindFirst("癎컬퀄綾句뗀");
//nieZi.transform.localEulerAngles = Vector3.zero;
mianQian = GameManager.Instance.senSor.GetSensor<MianQian_SenSor>();
fsm.ShowCamera("헌썅관튄왯1_Camera");
fsm.Light_EnableInteraction("쪘성땍춈헷");
@ -61,7 +62,8 @@ namespace DongWuYiXue.DaoNiaoShu
public override void OnStateStay()
{
base.OnStateStay();
nieZi.transform.localEulerAngles = new Vector3(-mianQian.X, mianQian.Y, mianQian.Z);
//nieZi.transform.localEulerAngles = new Vector3(0, mianQian.Y, -mianQian.X);
nieZi.transform.rotation = Quaternion.Euler(new Vector3(mianQian.Z, mianQian.Y, -mianQian.X));
if (xiaoDu.colliderNum >= 4)
{
xiaoDu.ExitCollider();
@ -71,6 +73,7 @@ namespace DongWuYiXue.DaoNiaoShu
public override void OnStateExit()
{
base.OnStateExit();
nieZi.transform.localEulerAngles = Vector3.zero;
xiaoDu.ExitCollider();
fsm.HideTipBtn();
if (null != cor)

View File

@ -16,6 +16,7 @@ namespace DongWuYiXue.DaoNiaoShu
xiaoDu = GameManager.Instance.transform.parent.FindFirst<XiaoDu_Collider>("pasted__pasted__SM_MianQiu7");
nieZi = GameManager.Instance.transform.parent.FindFirst("癎컬퀄綾句뗀");
//nieZi.transform.localEulerAngles = Vector3.zero;
mianQian = GameManager.Instance.senSor.GetSensor<MianQian_SenSor>();
fsm.ShowCamera("헌썅쿱돛왯1_Camera");
fsm.Light_EnableInteraction("쪘성땍춈헷");
@ -61,7 +62,8 @@ namespace DongWuYiXue.DaoNiaoShu
public override void OnStateStay()
{
base.OnStateStay();
nieZi.transform.localEulerAngles = new Vector3(-mianQian.X, mianQian.Y, mianQian.Z);
//nieZi.transform.localEulerAngles = new Vector3(0, mianQian.Y, -mianQian.X);
nieZi.transform.rotation = Quaternion.Euler(new Vector3(mianQian.Z, mianQian.Y, -mianQian.X));
if (xiaoDu.colliderNum >= 4)
{
xiaoDu.ExitCollider();
@ -71,6 +73,7 @@ namespace DongWuYiXue.DaoNiaoShu
public override void OnStateExit()
{
base.OnStateExit();
nieZi.transform.localEulerAngles = Vector3.zero;
xiaoDu.ExitCollider();
fsm.HideTipBtn();
if (null != cor)