1
This commit is contained in:
parent
51ba5028bc
commit
bd9f3b4e21
@ -30,7 +30,8 @@ public class ZhuSheQi_5SenSor : Sensor
|
|||||||
if (!datas.Split('%')[0].Split("ID:")[1].Split(',')[0].Equals("ZSQ5")) return;
|
if (!datas.Split('%')[0].Split("ID:")[1].Split(',')[0].Equals("ZSQ5")) return;
|
||||||
//this.Error(datas);
|
//this.Error(datas);
|
||||||
|
|
||||||
progressValue = ((Convert.ToInt32(datas.Split("%")[0].Split("LEVEL:")[1]))-3) / 7.0f;
|
//progressValue = ((Convert.ToInt32(datas.Split("%")[0].Split("LEVEL:")[1]))-3) / 7.0f;
|
||||||
|
progressValue = ((Convert.ToInt32(datas.Split("%")[0].Split("LEVEL:")[1]))-3) / 6.0f;
|
||||||
//this.Error($"当前5ml注射器的进度为:{progressValue}");
|
//this.Error($"当前5ml注射器的进度为:{progressValue}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ namespace UnityThreadingUtils
|
|||||||
{
|
{
|
||||||
_instance = this;
|
_instance = this;
|
||||||
// 让这个游戏对象在场景切换时不被销毁,确保持续可用
|
// 让这个游戏对象在场景切换时不被销毁,确保持续可用
|
||||||
DontDestroyOnLoad(gameObject);
|
//DontDestroyOnLoad(gameObject);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -39,7 +39,7 @@ namespace UnityThreadingUtils
|
|||||||
GameObject dispatcherGameObject = new GameObject("UnityMainThreadDispatcher");
|
GameObject dispatcherGameObject = new GameObject("UnityMainThreadDispatcher");
|
||||||
_instance = dispatcherGameObject.AddComponent<UnityMainThreadDispatcher>();
|
_instance = dispatcherGameObject.AddComponent<UnityMainThreadDispatcher>();
|
||||||
// 让这个游戏对象在场景切换时不被销毁,确保持续可用
|
// 让这个游戏对象在场景切换时不被销毁,确保持续可用
|
||||||
UnityEngine.Object.DontDestroyOnLoad(dispatcherGameObject);
|
//UnityEngine.Object.DontDestroyOnLoad(dispatcherGameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _instance;
|
return _instance;
|
||||||
|
|||||||
8
Assets/Third/SensorModule/Scripts/Sensor/器官插管.meta
Normal file
8
Assets/Third/SensorModule/Scripts/Sensor/器官插管.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0c1d2878670367045983e92bbb9d592d
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class QiGuanChaGuan_Sensor : Sensor
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 气管导管插入深度
|
||||||
|
/// </summary>
|
||||||
|
[HideInInspector]
|
||||||
|
public float qiGuanDeep;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否插入会厌
|
||||||
|
/// </summary>
|
||||||
|
[HideInInspector]
|
||||||
|
public bool isHuiYan;
|
||||||
|
string data;
|
||||||
|
|
||||||
|
public Text huiYan_Txt;
|
||||||
|
public Text qiGuanDeep_Txt;
|
||||||
|
public override void ReceiveData(string datas)
|
||||||
|
{
|
||||||
|
base.ReceiveData(datas);
|
||||||
|
data = datas.Split("#")[1].Split("%")[0];
|
||||||
|
if (!data.Contains("DWYX1")) return;
|
||||||
|
if (data.Contains("DATA"))
|
||||||
|
{
|
||||||
|
isHuiYan = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
isHuiYan = false;
|
||||||
|
}
|
||||||
|
if (data.Contains("QGDeep"))
|
||||||
|
{
|
||||||
|
qiGuanDeep = float.Parse(data.Split(",")[3].Split(":")[1].Split("mm")[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Display(string datas)
|
||||||
|
{
|
||||||
|
base.Display(datas);
|
||||||
|
huiYan_Txt.text = "暴露会厌:" + (isHuiYan ? "是" : "否");
|
||||||
|
qiGuanDeep_Txt.text = "气管导管插入深度:" + qiGuanDeep + " mm";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 189e63231d0003643b617b35a94e965c
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because it is too large
Load Diff
@ -26,8 +26,12 @@ namespace DongWuYiXue.QiGuanChaGuan
|
|||||||
{
|
{
|
||||||
base.OnStateStay();
|
base.OnStateStay();
|
||||||
if (isChaRu)
|
if (isChaRu)
|
||||||
{
|
{
|
||||||
if (Input.GetKeyDown(KeyCode.L))
|
//if (Input.GetKeyDown(KeyCode.L))
|
||||||
|
//{
|
||||||
|
// chaRuValue = 1;
|
||||||
|
//}
|
||||||
|
if (GameManager.Instance.senSor.GetSensor<QiGuanChaGuan_Sensor>().isHuiYan)
|
||||||
{
|
{
|
||||||
chaRuValue = 1;
|
chaRuValue = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,11 @@ namespace DongWuYiXue.QiGuanChaGuan
|
|||||||
if (isChaRu)
|
if (isChaRu)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (Input.GetKeyDown(KeyCode.L))
|
//if (Input.GetKeyDown(KeyCode.L))
|
||||||
|
//{
|
||||||
|
// chaRuValue = 1;
|
||||||
|
//}
|
||||||
|
if (GameManager.Instance.senSor.GetSensor<QiGuanChaGuan_Sensor>().qiGuanDeep > 60)
|
||||||
{
|
{
|
||||||
chaRuValue = 1;
|
chaRuValue = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,20 +23,20 @@ namespace DongWuYiXue.QiGuanChaGuan
|
|||||||
fsm.ShowTip(1);
|
fsm.ShowTip(1);
|
||||||
fsm.PlayBgm(1);
|
fsm.PlayBgm(1);
|
||||||
openValue = 0;
|
openValue = 0;
|
||||||
//cor = Game.Instance.IEnumeratorManager.Run(3.0f, () =>
|
cor = Game.Instance.IEnumeratorManager.Run(3.0f, () =>
|
||||||
//{
|
{
|
||||||
isOpen = true;
|
isOpen = true;
|
||||||
//});
|
});
|
||||||
}
|
}
|
||||||
public override void OnStateStay()
|
public override void OnStateStay()
|
||||||
{
|
{
|
||||||
base.OnStateStay();
|
base.OnStateStay();
|
||||||
if (isOpen)
|
if (isOpen)
|
||||||
{
|
{
|
||||||
if (Input.GetKeyDown(KeyCode.L))
|
//if (Input.GetKeyDown(KeyCode.L))
|
||||||
{
|
//{
|
||||||
openValue = 1;
|
openValue = 1;
|
||||||
}
|
//}
|
||||||
fsm.PlayClip("´ňżŞżÚÇť1_TimeLine", null, openValue);
|
fsm.PlayClip("´ňżŞżÚÇť1_TimeLine", null, openValue);
|
||||||
if (openValue >= 1.0f)
|
if (openValue >= 1.0f)
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user