1
This commit is contained in:
parent
11576d4097
commit
01916c83f6
40
Assets/Art/RenderTexture/TouShi2.renderTexture
Normal file
40
Assets/Art/RenderTexture/TouShi2.renderTexture
Normal file
@ -0,0 +1,40 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!84 &8400000
|
||||
RenderTexture:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: TouShi2
|
||||
m_ImageContentsHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
m_ForcedFallbackFormat: 4
|
||||
m_DownscaleFallback: 0
|
||||
m_IsAlphaChannelOptional: 0
|
||||
serializedVersion: 5
|
||||
m_Width: 2048
|
||||
m_Height: 2048
|
||||
m_AntiAliasing: 1
|
||||
m_MipCount: -1
|
||||
m_DepthStencilFormat: 94
|
||||
m_ColorFormat: 8
|
||||
m_MipMap: 0
|
||||
m_GenerateMips: 1
|
||||
m_SRGB: 0
|
||||
m_UseDynamicScale: 0
|
||||
m_BindMS: 0
|
||||
m_EnableCompatibleFormat: 1
|
||||
m_EnableRandomWrite: 0
|
||||
m_TextureSettings:
|
||||
serializedVersion: 2
|
||||
m_FilterMode: 1
|
||||
m_Aniso: 0
|
||||
m_MipBias: 0
|
||||
m_WrapU: 1
|
||||
m_WrapV: 1
|
||||
m_WrapW: 1
|
||||
m_Dimension: 2
|
||||
m_VolumeDepth: 1
|
||||
m_ShadowSamplingMode: 2
|
||||
8
Assets/Art/RenderTexture/TouShi2.renderTexture.meta
Normal file
8
Assets/Art/RenderTexture/TouShi2.renderTexture.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a4557ab902d2374e9ccc66e7d32fc03
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 8400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -21,7 +21,7 @@ TextureImporter:
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
isReadable: 1
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
@ -45,7 +45,7 @@ TextureImporter:
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
|
||||
@ -21,7 +21,7 @@ TextureImporter:
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
isReadable: 1
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
@ -45,7 +45,7 @@ TextureImporter:
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
|
||||
@ -21,7 +21,7 @@ TextureImporter:
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
isReadable: 1
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
@ -45,7 +45,7 @@ TextureImporter:
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
|
||||
Binary file not shown.
@ -82,33 +82,33 @@ MonoBehaviour:
|
||||
m_Textures:
|
||||
blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
|
||||
bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
|
||||
m_PrefilteringModeMainLightShadows: 1
|
||||
m_PrefilteringModeAdditionalLight: 4
|
||||
m_PrefilteringModeAdditionalLightShadows: 1
|
||||
m_PrefilterXRKeywords: 0
|
||||
m_PrefilteringModeForwardPlus: 1
|
||||
m_PrefilteringModeDeferredRendering: 1
|
||||
m_PrefilteringModeScreenSpaceOcclusion: 1
|
||||
m_PrefilterDebugKeywords: 0
|
||||
m_PrefilterWriteRenderingLayers: 0
|
||||
m_PrefilterHDROutput: 0
|
||||
m_PrefilteringModeMainLightShadows: 3
|
||||
m_PrefilteringModeAdditionalLight: 3
|
||||
m_PrefilteringModeAdditionalLightShadows: 0
|
||||
m_PrefilterXRKeywords: 1
|
||||
m_PrefilteringModeForwardPlus: 0
|
||||
m_PrefilteringModeDeferredRendering: 0
|
||||
m_PrefilteringModeScreenSpaceOcclusion: 2
|
||||
m_PrefilterDebugKeywords: 1
|
||||
m_PrefilterWriteRenderingLayers: 1
|
||||
m_PrefilterHDROutput: 1
|
||||
m_PrefilterSSAODepthNormals: 0
|
||||
m_PrefilterSSAOSourceDepthLow: 0
|
||||
m_PrefilterSSAOSourceDepthMedium: 0
|
||||
m_PrefilterSSAOSourceDepthHigh: 0
|
||||
m_PrefilterSSAOInterleaved: 0
|
||||
m_PrefilterSSAOSourceDepthLow: 1
|
||||
m_PrefilterSSAOSourceDepthMedium: 1
|
||||
m_PrefilterSSAOSourceDepthHigh: 1
|
||||
m_PrefilterSSAOInterleaved: 1
|
||||
m_PrefilterSSAOBlueNoise: 0
|
||||
m_PrefilterSSAOSampleCountLow: 0
|
||||
m_PrefilterSSAOSampleCountMedium: 0
|
||||
m_PrefilterSSAOSampleCountLow: 1
|
||||
m_PrefilterSSAOSampleCountMedium: 1
|
||||
m_PrefilterSSAOSampleCountHigh: 0
|
||||
m_PrefilterDBufferMRT1: 0
|
||||
m_PrefilterDBufferMRT2: 0
|
||||
m_PrefilterDBufferMRT3: 0
|
||||
m_PrefilterSoftShadowsQualityLow: 0
|
||||
m_PrefilterSoftShadowsQualityMedium: 0
|
||||
m_PrefilterSoftShadowsQualityHigh: 0
|
||||
m_PrefilterDBufferMRT1: 1
|
||||
m_PrefilterDBufferMRT2: 1
|
||||
m_PrefilterDBufferMRT3: 1
|
||||
m_PrefilterSoftShadowsQualityLow: 1
|
||||
m_PrefilterSoftShadowsQualityMedium: 1
|
||||
m_PrefilterSoftShadowsQualityHigh: 1
|
||||
m_PrefilterSoftShadows: 0
|
||||
m_PrefilterScreenCoord: 0
|
||||
m_PrefilterNativeRenderPass: 0
|
||||
m_PrefilterScreenCoord: 1
|
||||
m_PrefilterNativeRenderPass: 1
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 0
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ff0498584e6f2b5428f041ab9509104b
|
||||
guid: e39ff17ff771aa746a2d4c73d066091d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58e3d70ecae579343a7656a246ca3b47
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70dae7b1602d0f5499910a6fc78a4727
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: abe8d1e1305c3c2458cc3b3c7e2afc04
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b6b298855abd3b8469dc8003c612960a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -37,7 +37,7 @@ public class ChatUI : MonoBehaviour
|
||||
private float wakeUpCountdownTime = 5f;
|
||||
private float wakeUpCurrentTime;
|
||||
private Coroutine coroutine;
|
||||
public XunFeiWakeup xunFeiWakeup;//语音唤醒
|
||||
public ZXKWakeup xunFeiWakeup;//语音唤醒
|
||||
private bool chatUIOpen;
|
||||
private string speakTxt;
|
||||
public string SpeakTxt
|
||||
@ -329,11 +329,10 @@ public class ChatUI : MonoBehaviour
|
||||
public void ShowDialogueEvent()
|
||||
{
|
||||
chatuiObj.transform.DOMove(p1.position, 0.5f);
|
||||
//audioSource.volume = 1;
|
||||
}
|
||||
void Listener()
|
||||
{
|
||||
if (wakeUpCurrentTime <= 0 && !Thinking && /*!Typing*/ /*&& !audioSource.isPlaying &&*/ !chatUIOpen && !prefab_v_next.activeSelf && !prefab_h_next.activeSelf)
|
||||
if (wakeUpCurrentTime <= 0 && !Thinking && !chatUIOpen && !prefab_v_next.activeSelf && !prefab_h_next.activeSelf)
|
||||
{
|
||||
closed = false;
|
||||
wakeUpCurrentTime = 0;
|
||||
@ -341,42 +340,17 @@ public class ChatUI : MonoBehaviour
|
||||
audioSource.Stop();
|
||||
if (coroutine != null) StopCoroutine(coroutine);
|
||||
GenChatTxt("你好,我在");
|
||||
//Typing = true;
|
||||
audioSource.clip = welcomeAudioCilp;
|
||||
audioSource.Play();
|
||||
coroutine = StartCoroutine(WaitExecute(welcomeAudioCilp.length, () => {
|
||||
wakeUpCurrentTime = wakeUpCountdownTime;
|
||||
//Typing = false;
|
||||
ChatAI.Instance.StartRecording(str => {
|
||||
SpeakTxt = str;
|
||||
});
|
||||
}));
|
||||
}
|
||||
}
|
||||
//void Check(string txt)
|
||||
//{
|
||||
// if (wakeUpCurrentTime <= 0 && Regex.Replace(txt, @"[\p{P}\p{S}]", "").Contains("小智小智") && !Thinking && !Typing && !audioSource.isPlaying && !chatUIOpen)
|
||||
// {
|
||||
// closed = false;
|
||||
// wakeUpCurrentTime = 0;
|
||||
// ChatAI.Instance.StopVoice();
|
||||
// audioSource.Stop();
|
||||
// if (coroutine != null) StopCoroutine(coroutine);
|
||||
// GenChatTxt("你好,我在");
|
||||
// Typing = true;
|
||||
// audioSource.clip = welcomeAudioCilp;
|
||||
// audioSource.Play();
|
||||
// coroutine = StartCoroutine(WaitExecute(welcomeAudioCilp.length + 1.5f, () => {
|
||||
// wakeUpCurrentTime = wakeUpCountdownTime;
|
||||
// Typing = false;
|
||||
// }));
|
||||
// }
|
||||
// if (!audioSource.isPlaying && wakeUpCurrentTime > 0 && !Thinking && !Typing && !closed && !chatUIOpen)
|
||||
// {
|
||||
// Debug.Log("语音正在输入中: " + Regex.Replace(txt, @"[\p{P}\p{S}]", ""));
|
||||
// SpeakTxt = txt;
|
||||
// }
|
||||
//}
|
||||
|
||||
void GenChatTxt(string txt)
|
||||
{
|
||||
int lineCount = Regex.Matches(txt, @"\r\n|\r|\n").Count + 1;
|
||||
@ -418,7 +392,6 @@ public class ChatUI : MonoBehaviour
|
||||
wakeUpCurrentTime = 0;
|
||||
ChatAI.Instance.StopRecording();
|
||||
Thinking = false;
|
||||
//Typing = false;
|
||||
ChatAI.Instance.StopVoice();
|
||||
ChatAI.Instance.StopSend();
|
||||
audioSource.Stop();
|
||||
@ -433,6 +406,7 @@ public class ChatUI : MonoBehaviour
|
||||
{
|
||||
CloseChatTxt();
|
||||
action?.Invoke();
|
||||
action = null;
|
||||
}
|
||||
|
||||
IEnumerator WaitExecute(float t, Action callBack)
|
||||
@ -440,14 +414,4 @@ public class ChatUI : MonoBehaviour
|
||||
yield return new WaitForSeconds(t);
|
||||
callBack?.Invoke();
|
||||
}
|
||||
//IEnumerator TypeText(float totalTime, string fullText, Action<string> callBack, Action action)
|
||||
//{
|
||||
// float timePerCharacter = totalTime / fullText.Length;
|
||||
// for (int i = 0; i <= fullText.Length; i++)
|
||||
// {
|
||||
// callBack?.Invoke(fullText.Substring(0, i));
|
||||
// yield return new WaitForSeconds(timePerCharacter);
|
||||
// }
|
||||
// action?.Invoke();
|
||||
//}
|
||||
}
|
||||
|
||||
@ -2,8 +2,10 @@ using LitJson;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
using UnityEngine.Windows;
|
||||
using YiLiao.Main;
|
||||
|
||||
public class ChatZxkAI : LLM
|
||||
@ -79,7 +81,10 @@ public class ChatZxkAI : LLM
|
||||
Debug.Log(responseBody["choices"][0]["message"]["content"].ToString() + "\nAI-ºÄʱ" + stopwatch.Elapsed.TotalSeconds);
|
||||
assistant = responseBody["choices"][0]["message"]["content"].ToString();
|
||||
//»Øµ÷
|
||||
_callback?.Invoke(responseBody["choices"][0]["message"]["content"].ToString());
|
||||
string pattern = @"\[.*?\]|\(CITE\)";
|
||||
//执行替换,将匹配到的内容替换为空字符串
|
||||
string result = Regex.Replace(assistant, pattern, "");
|
||||
_callback?.Invoke(result);
|
||||
success = true;
|
||||
}
|
||||
else if (coroutineRunning)
|
||||
|
||||
@ -2,21 +2,21 @@ using System.Text.RegularExpressions;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class WeiGuan_Sensor : Sensor
|
||||
public class TZQ_Sensor : Sensor
|
||||
{
|
||||
[SerializeField]
|
||||
Text txt;
|
||||
public int WBDeep = 0;
|
||||
public int positionValue = 0;
|
||||
public override void ReceiveData(string datas)
|
||||
{
|
||||
base.ReceiveData(datas);
|
||||
Regex regex = new Regex(@"#ID:WBJC.*?WBDeep:(\d+)");
|
||||
Regex regex = new Regex(@"Position:(\d+)");
|
||||
Match match = regex.Match(datas);
|
||||
if (match.Success)
|
||||
{
|
||||
if (int.TryParse(match.Groups[1].Value, out WBDeep))
|
||||
if (int.TryParse(match.Groups[1].Value, out positionValue))
|
||||
{
|
||||
txt.text = "WBJC:" + WBDeep;
|
||||
txt.text = "µãλ:" + positionValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
/// Îü̵»ú
|
||||
/// </summary>
|
||||
public class XiTanJi_SenSor : Sensor
|
||||
{
|
||||
public bool LianJie;
|
||||
public float progressValue;
|
||||
[SerializeField]
|
||||
Text txt;
|
||||
public override void ReceiveData(string datas)
|
||||
{
|
||||
base.ReceiveData(datas);
|
||||
Regex regex = new Regex(@"#ID:([^,]+).*?Press:([\d.]+)");
|
||||
Match match = regex.Match(datas);
|
||||
if (match.Success)
|
||||
{
|
||||
string idName = match.Groups[1].Value;
|
||||
if (idName == "XTJ")
|
||||
{
|
||||
LianJie = true;
|
||||
txt.text = "CONNECTED";
|
||||
}
|
||||
}
|
||||
|
||||
Regex regex3 = new Regex(@"DISCONNECTED");
|
||||
Match match3 = regex3.Match(datas);
|
||||
if (match3.Success)
|
||||
{
|
||||
LianJie = false;
|
||||
txt.text = "DISCONNECTED";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b72659c78c0ea74794a69b42cef4e31
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,26 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using Unity.VisualScripting.Antlr3.Runtime;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class XiTanJianCe_SenSor : Sensor
|
||||
{
|
||||
[SerializeField]
|
||||
Text txt;
|
||||
public int XTDeep = 0;
|
||||
public override void ReceiveData(string datas)
|
||||
{
|
||||
base.ReceiveData(datas);
|
||||
Regex regex = new Regex(@"#ID:WBJC.*?XTDeep:(\d+)");
|
||||
Match match = regex.Match(datas);
|
||||
if (match.Success)
|
||||
{
|
||||
if (int.TryParse(match.Groups[1].Value, out XTDeep))
|
||||
{
|
||||
txt.text = "WBJC:" + XTDeep;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
25
Assets/Third/SensorModule/Scripts/Sensor/ZXKWakeup.cs
Normal file
25
Assets/Third/SensorModule/Scripts/Sensor/ZXKWakeup.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using NAudio.Wave;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
/// <summary>
|
||||
/// 语音工具
|
||||
/// </summary>
|
||||
public class ZXKWakeup : Sensor
|
||||
{
|
||||
//唤醒词:小智小智
|
||||
public Action callBack;//唤醒回调
|
||||
public override void ReceiveData(string datas)
|
||||
{
|
||||
base.ReceiveData(datas);
|
||||
if (datas.TrimEnd('\n', '\r') == "hello")
|
||||
{
|
||||
callBack?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57b72e9322c57a34c995136f0b6bb88c
|
||||
guid: 480b147f8d3252a4abaf864aefc8672b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
File diff suppressed because it is too large
Load Diff
@ -395,7 +395,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case "1":
|
||||
case "3":
|
||||
GameObject.Find("nan")?.GetComponent<TzqController>().SetPos("气管听诊器位置1");
|
||||
GameObject.Find("nan_透明")?.GetComponent<TzqController>().SetPos("气管听诊器位置1_透明");
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("气管听诊器位置1_taigebo");
|
||||
@ -407,7 +407,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("支气管听诊器位置1_taigebo");
|
||||
GameObject.Find("nan_taigebo_透明")?.GetComponent<TzqController>().SetPos("支气管听诊器位置1_taigebo_透明");
|
||||
break;
|
||||
case "3":
|
||||
case "1":
|
||||
GameObject.Find("nan")?.GetComponent<TzqController>().SetPos("支气管肺泡听诊器位置1");
|
||||
GameObject.Find("nan_透明")?.GetComponent<TzqController>().SetPos("支气管肺泡听诊器位置1_透明");
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("支气管肺泡听诊器位置1_taigebo");
|
||||
@ -419,49 +419,49 @@ namespace YiLiao.XinFeiTingZhen
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("支气管肺泡听诊器位置2_taigebo");
|
||||
GameObject.Find("nan_taigebo_透明")?.GetComponent<TzqController>().SetPos("支气管肺泡听诊器位置2_taigebo_透明");
|
||||
break;
|
||||
case "5":
|
||||
case "8":
|
||||
GameObject.Find("nan")?.GetComponent<TzqController>().SetPos("支气管肺泡听诊器位置3");
|
||||
GameObject.Find("nan_透明")?.GetComponent<TzqController>().SetPos("支气管肺泡听诊器位置3_透明");
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("支气管肺泡听诊器位置3_taigebo");
|
||||
GameObject.Find("nan_taigebo_透明")?.GetComponent<TzqController>().SetPos("支气管肺泡听诊器位置3_taigebo_透明");
|
||||
break;
|
||||
case "6":
|
||||
case "9":
|
||||
GameObject.Find("nan")?.GetComponent<TzqController>().SetPos("支气管肺泡听诊器位置4");
|
||||
GameObject.Find("nan_透明")?.GetComponent<TzqController>().SetPos("支气管肺泡听诊器位置4_透明");
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("支气管肺泡听诊器位置4_taigebo");
|
||||
GameObject.Find("nan_taigebo_透明")?.GetComponent<TzqController>().SetPos("支气管肺泡听诊器位置4_taigebo_透明");
|
||||
break;
|
||||
case "7":
|
||||
case "16":
|
||||
GameObject.Find("nan")?.GetComponent<TzqController>().SetPos("肺泡听诊器位置1");
|
||||
GameObject.Find("nan_透明")?.GetComponent<TzqController>().SetPos("肺泡听诊器位置1_透明");
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("肺泡听诊器位置1_taigebo");
|
||||
GameObject.Find("nan_taigebo_透明")?.GetComponent<TzqController>().SetPos("肺泡听诊器位置1_taigebo_透明");
|
||||
break;
|
||||
case "8":
|
||||
case "28":
|
||||
GameObject.Find("nan")?.GetComponent<TzqController>().SetPos("肺泡听诊器位置2");
|
||||
GameObject.Find("nan_透明")?.GetComponent<TzqController>().SetPos("肺泡听诊器位置2_透明");
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("肺泡听诊器位置2_taigebo");
|
||||
GameObject.Find("nan_taigebo_透明")?.GetComponent<TzqController>().SetPos("肺泡听诊器位置2_taigebo_透明");
|
||||
break;
|
||||
case "9":
|
||||
case "23":
|
||||
GameObject.Find("nan")?.GetComponent<TzqController>().SetPos("左右腋中线第5、6肋间听诊器位置1");
|
||||
GameObject.Find("nan_透明")?.GetComponent<TzqController>().SetPos("左右腋中线第5、6肋间听诊器位置1_透明");
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("左右腋中线第5、6肋间听诊器位置1_taigebo");
|
||||
GameObject.Find("nan_taigebo_透明")?.GetComponent<TzqController>().SetPos("左右腋中线第5、6肋间听诊器位置1_taigebo_透明");
|
||||
break;
|
||||
case "10":
|
||||
case "19":
|
||||
GameObject.Find("nan")?.GetComponent<TzqController>().SetPos("左右腋中线第5、6肋间听诊器位置2");
|
||||
GameObject.Find("nan_透明")?.GetComponent<TzqController>().SetPos("左右腋中线第5、6肋间听诊器位置2_透明");
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("左右腋中线第5、6肋间听诊器位置2_taigebo");
|
||||
GameObject.Find("nan_taigebo_透明")?.GetComponent<TzqController>().SetPos("左右腋中线第5、6肋间听诊器位置2_taigebo_透明");
|
||||
break;
|
||||
case "11":
|
||||
case "15":
|
||||
GameObject.Find("nan")?.GetComponent<TzqController>().SetPos("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
GameObject.Find("nan_透明")?.GetComponent<TzqController>().SetPos("左锁骨中线与第5肋间交点内0.5cm听诊器位置1_透明");
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("左锁骨中线与第5肋间交点内0.5cm听诊器位置1_taigebo");
|
||||
GameObject.Find("nan_taigebo_透明")?.GetComponent<TzqController>().SetPos("左锁骨中线与第5肋间交点内0.5cm听诊器位置1_taigebo_透明");
|
||||
break;
|
||||
case "12":
|
||||
case "11":
|
||||
GameObject.Find("nan")?.GetComponent<TzqController>().SetPos("胸骨左缘第3肋间听诊器位置1");
|
||||
GameObject.Find("nan_透明")?.GetComponent<TzqController>().SetPos("胸骨左缘第3肋间听诊器位置1_透明");
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("胸骨左缘第3肋间听诊器位置1_taigebo");
|
||||
@ -479,13 +479,13 @@ namespace YiLiao.XinFeiTingZhen
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("胸骨左缘第5肋间听诊器位置1_taigebo");
|
||||
GameObject.Find("nan_taigebo_透明")?.GetComponent<TzqController>().SetPos("胸骨左缘第5肋间听诊器位置1_taigebo_透明");
|
||||
break;
|
||||
case "15":
|
||||
case "12":
|
||||
GameObject.Find("nan")?.GetComponent<TzqController>().SetPos("心底部听诊器位置1");
|
||||
GameObject.Find("nan_透明")?.GetComponent<TzqController>().SetPos("心底部听诊器位置1_透明");
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("心底部听诊器位置1_taigebo");
|
||||
GameObject.Find("nan_taigebo_透明")?.GetComponent<TzqController>().SetPos("心底部听诊器位置1_taigebo_透明");
|
||||
break;
|
||||
case "16":
|
||||
case "--":
|
||||
GameObject.Find("nan")?.GetComponent<TzqController>().SetPos("心底部听诊器位置2");
|
||||
GameObject.Find("nan_透明")?.GetComponent<TzqController>().SetPos("心底部听诊器位置2_透明");
|
||||
GameObject.Find("nan_taigebo")?.GetComponent<TzqController>().SetPos("心底部听诊器位置2_taigebo");
|
||||
|
||||
@ -7,14 +7,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class CuCaoXingHuXiYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "7", "8" };
|
||||
List<string> success = new() { "16", "28" };
|
||||
string audioName = "35--粗糙性呼吸音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:16,28;SONG:35,35;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("肺泡听诊器位置1");
|
||||
@ -25,7 +32,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -76,12 +82,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
fsm.Unlight("肺泡听诊器位置2");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
@ -89,7 +100,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -99,7 +110,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,14 +7,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class CuShiLuoYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "1";
|
||||
string success = "3";
|
||||
string audioName = "38--大湿罗音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:3;SONG:38;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("气管听诊器位置1");
|
||||
@ -24,7 +31,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -75,12 +81,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("Æø¹ÜÌýÕïÆ÷λÖÃ1");
|
||||
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("气管听诊器位置1");
|
||||
@ -88,7 +99,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && success != PositionValue)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -98,7 +109,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,27 +7,45 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DiDiaoGanLuoYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "3", "4", "5", "6" };
|
||||
List<string> success = new() { "8", "9" };
|
||||
Coroutine cor;
|
||||
string audioName = "44--鼾音";
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
bool step2_kh;
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置1");
|
||||
fsm.Light("支气管肺泡听诊器位置2");
|
||||
fsm.Light("支气管肺泡听诊器位置3");
|
||||
fsm.Light("支气管肺泡听诊器位置4");
|
||||
fsm.ShowArrow("将实物听诊器放置于胸骨两侧第1、2肋间隙处进行听诊。", "支气管肺泡听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:8,9;SONG:44,44;%");
|
||||
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
||||
{
|
||||
step2_kh = true;
|
||||
fsm.HideTzq();
|
||||
fsm.ShowTxtImgQuestion("肺部听诊——异常呼吸音——啰音——低调干啰音", 19, 0, 5, () => {
|
||||
fsm.ChangeState("ShiLuoYin");
|
||||
});
|
||||
}
|
||||
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
||||
{
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置1");
|
||||
fsm.Light("支气管肺泡听诊器位置2");
|
||||
fsm.Light("支气管肺泡听诊器位置3");
|
||||
fsm.Light("支气管肺泡听诊器位置4");
|
||||
fsm.ShowArrow("将实物听诊器放置于胸骨两侧第1、2肋间隙处进行听诊。", "支气管肺泡听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,12 +96,19 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置1");
|
||||
fsm.Unlight("支气管肺泡听诊器位置2");
|
||||
fsm.Unlight("支气管肺泡听诊器位置3");
|
||||
fsm.Unlight("支气管肺泡听诊器位置4");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置1");
|
||||
@ -93,17 +118,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
}
|
||||
if (step2_kh)
|
||||
{
|
||||
fsm.ShowTzq(PositionValue);
|
||||
}
|
||||
}
|
||||
public override void OnStateExit()
|
||||
{
|
||||
base.OnStateExit();
|
||||
step2_kh = false;
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,14 +6,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DiErXinYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "11";
|
||||
string success = "15";
|
||||
string audioName = "第二心音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:1;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
@ -23,7 +30,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -74,19 +80,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && PositionValue != success)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -96,7 +106,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,27 +7,31 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DiErXinYinFanChangFenLie : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "15", "16" };
|
||||
List<string> success = new() { "9" };
|
||||
string audioName = "第二心音反常分裂";
|
||||
Coroutine cor;
|
||||
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.multiObjectController.RotateAllTo180(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("心底部听诊器位置1");
|
||||
fsm.Light("心底部听诊器位置2");
|
||||
fsm.ShowArrow("将实物听诊器放置于心底部进行听诊。", "心底部听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:9;SONG:1;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("心底部听诊器位置2");
|
||||
fsm.ShowArrow("将实物听诊器放置于心底部进行听诊。", "心底部听诊器位置2", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,12 +82,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("心底部听诊器位置1");
|
||||
fsm.Unlight("心底部听诊器位置2");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("心底部听诊器位置1");
|
||||
@ -91,7 +100,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -101,7 +110,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,27 +7,30 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DiErXinYinGuDingFenLie : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "15", "16" };
|
||||
List<string> success = new() { "9" };
|
||||
string audioName = "第二心音固定分裂";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.multiObjectController.RotateAllTo180(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("心底部听诊器位置1");
|
||||
fsm.Light("心底部听诊器位置2");
|
||||
fsm.ShowArrow("将实物听诊器放置于心底部进行听诊。", "心底部听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:9;SONG:1;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("心底部听诊器位置2");
|
||||
fsm.ShowArrow("将实物听诊器放置于心底部进行听诊。", "心底部听诊器位置2", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,20 +81,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("心底部听诊器位置2");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("心底部听诊器位置1");
|
||||
fsm.Unlight("心底部听诊器位置2");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -101,7 +107,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,27 +7,31 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DiErXinYinJianRuo : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "15", "16" };
|
||||
List<string> success = new() { "8", "9" };
|
||||
string audioName = "第二心音减弱";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.multiObjectController.RotateAllTo180(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("心底部听诊器位置1");
|
||||
fsm.Light("心底部听诊器位置2");
|
||||
fsm.ShowArrow("将实物听诊器放置于心底部进行听诊。", "心底部听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:8,9;SONG:1,1;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("心底部听诊器位置1");
|
||||
fsm.Light("心底部听诊器位置2");
|
||||
fsm.ShowArrow("将实物听诊器放置于心底部进行听诊。", "心底部听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,12 +82,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("心底部听诊器位置1");
|
||||
fsm.Unlight("心底部听诊器位置2");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("心底部听诊器位置1");
|
||||
@ -91,7 +100,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -101,7 +110,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,27 +7,30 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DiErXinYinTongChangFenLie : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "15", "16" };
|
||||
List<string> success = new() { "9" };
|
||||
string audioName = "第二心音通常分裂";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.multiObjectController.RotateAllTo180(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("心底部听诊器位置1");
|
||||
fsm.Light("心底部听诊器位置2");
|
||||
fsm.ShowArrow("将实物听诊器放置于心底部进行听诊。", "心底部听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:9;SONG:1;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("心底部听诊器位置2");
|
||||
fsm.ShowArrow("将实物听诊器放置于心底部进行听诊。", "心底部听诊器位置2", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,20 +81,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("心底部听诊器位置2");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("心底部听诊器位置1");
|
||||
fsm.Unlight("心底部听诊器位置2");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -101,7 +107,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,15 +7,22 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DiErXinYinZengQiang : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "15", "16" };
|
||||
List<string> success = new() { "8", "9" };
|
||||
string audioName = "59--第二心音增强";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.multiObjectController.RotateAllTo180(() => {
|
||||
GameManager.Instance.senSor.SendFunction("#ID:8,9;SONG:59,59;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("心底部听诊器位置1");
|
||||
@ -27,7 +34,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,12 +84,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("心底部听诊器位置1");
|
||||
fsm.Unlight("心底部听诊器位置2");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("心底部听诊器位置1");
|
||||
@ -91,7 +102,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -101,7 +112,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,14 +6,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DiSanXinYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "11";
|
||||
string success = "15";
|
||||
string audioName = "54--正常第三心音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:54;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
@ -23,7 +30,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -74,19 +80,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && PositionValue != success)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -96,7 +106,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,14 +6,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DiSiXinYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "11";
|
||||
string success = "15";
|
||||
string audioName = "第四心音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:1;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
@ -23,7 +30,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -74,19 +80,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && PositionValue != success)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -96,7 +106,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,14 +6,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DiYiXinYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "11";
|
||||
string success = "15";
|
||||
string audioName = "第一心音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:1;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
@ -23,7 +30,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -74,19 +80,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && PositionValue != success)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -96,7 +106,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,27 +7,30 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DiYiXinYinFenLie : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "11"};
|
||||
List<string> success = new() { "15"};
|
||||
string audioName = "61--第一心音分裂";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
|
||||
GameManager.Instance.multiObjectController.RotateAllTo0(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于心底部进行听诊。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:61;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于心底部进行听诊。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,19 +81,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -100,7 +107,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,14 +6,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DiYiXinYinJianRuo : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "11";
|
||||
string success = "15";
|
||||
string audioName = "57--第一心音减弱";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:57;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
@ -23,7 +30,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -74,19 +80,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && PositionValue != success)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -96,7 +106,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,14 +6,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DiYiXinYinQiangRuoBuDeng : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "11";
|
||||
string success = "15";
|
||||
string audioName = "第一心音强弱不等";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:1;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
@ -23,7 +30,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -74,19 +80,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && PositionValue != success)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -96,7 +106,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,14 +6,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DiYiXinYinZengQiang : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "11";
|
||||
string success = "15";
|
||||
string audioName = "56--第一心音增强";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:56;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
@ -23,7 +30,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -74,19 +80,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && PositionValue != success)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -96,7 +106,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,14 +7,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class DuanXuXingHuXiYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "7", "8" };
|
||||
List<string> success = new() { "16", "28" };
|
||||
string audioName = "34--断续性呼吸音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:16,28;SONG:34,34;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("肺泡听诊器位置1");
|
||||
@ -25,7 +32,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -76,12 +82,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
fsm.Unlight("肺泡听诊器位置2");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
@ -89,7 +100,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -99,7 +110,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,24 +6,44 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class ErJianBanQu : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "11";
|
||||
string success = "15";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
bool step2_kh;
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.PlayClip("二尖瓣区");
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于左锁骨中线与第5肋间交点内0.5cm处。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:54;%");
|
||||
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
||||
{
|
||||
step2_kh = true;
|
||||
fsm.HideTzq();
|
||||
fsm.ShowTxtImgQuestion("心脏听诊——心脏杂音——舒张期杂音——二尖瓣区", 23, 0, 5, () => {
|
||||
fsm.ShowTxtImgQuestion("心脏听诊——心脏杂音——舒张期杂音——二尖瓣区", 24, 0, 5, () => {
|
||||
fsm.ChangeState("ShuZhangZaoQiBenMaLv");
|
||||
});
|
||||
});
|
||||
}
|
||||
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
||||
{
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.PlayClip("二尖瓣区");
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于左锁骨中线与第5肋间交点内0.5cm处。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -70,28 +90,35 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && success != PositionValue)
|
||||
{
|
||||
False();
|
||||
}
|
||||
}
|
||||
if (step2_kh)
|
||||
{
|
||||
fsm.ShowTzq(PositionValue);
|
||||
}
|
||||
}
|
||||
public override void OnStateExit()
|
||||
{
|
||||
base.OnStateExit();
|
||||
step2_kh = false;
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,26 +7,30 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class ErJianBanQu2 : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "11" };
|
||||
List<string> success = new() { "15" };
|
||||
string audioName = "72--二尖瓣关闭不全";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.multiObjectController.RotateAllTo0(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于左锁骨中线与第5肋间交点内0.5cm处进行听诊。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:72;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于左锁骨中线与第5肋间交点内0.5cm处进行听诊。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -77,19 +81,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -99,7 +107,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,26 +7,30 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class ErJianBanQu3 : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "11" };
|
||||
List<string> success = new() { "15" };
|
||||
string audioName = "76--二尖瓣狭窄";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.multiObjectController.RotateAllTo0(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于左锁骨中线与第5肋间交点内0.5cm处进行听诊。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:76;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于左锁骨中线与第5肋间交点内0.5cm处进行听诊。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -77,19 +81,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -99,7 +107,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,13 +6,20 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class FeiDongMaiBanQu : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "6";
|
||||
string success = "9";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:9;SONG:54;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置4");
|
||||
@ -22,7 +29,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -69,19 +75,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("Ö§Æø¹Ü·ÎÅÝÌýÕïÆ÷λÖÃ4");
|
||||
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置4");
|
||||
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && success != PositionValue)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -91,7 +101,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,14 +6,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class FeiDongMaiBanQu2 : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "6";
|
||||
string success = "9";
|
||||
string audioName = "74--肺动脉瓣区收缩期杂音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:9;SONG:74;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置4");
|
||||
@ -23,7 +30,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -74,19 +80,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("Ö§Æø¹Ü·ÎÅÝÌýÕïÆ÷λÖÃ4");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置4");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && PositionValue != success)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -96,7 +106,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,14 +6,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class FeiDongMaiBanQu3 : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "6";
|
||||
string success = "9";
|
||||
string audioName = "肺动脉瓣区";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:9;SONG:1;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置4");
|
||||
@ -23,7 +30,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -74,19 +80,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("Ö§Æø¹Ü·ÎÅÝÌýÕïÆ÷λÖÃ4");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置4");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && PositionValue != success)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -96,7 +106,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,17 +7,26 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class FeiPaoHuXiYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
bool step2_kh;
|
||||
//냥묘돨깃羚
|
||||
List<string> success = new() {"7", "8"};
|
||||
List<string> success = new() {"16", "28"};
|
||||
Coroutine cor;
|
||||
string audioName = "30--로텟빌俱稜";
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
|
||||
GameManager.Instance.senSor.SendFunction("#ID:16,28;SONG:30,30;%");
|
||||
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
||||
{
|
||||
step2_kh = true;
|
||||
fsm.HideTzq();
|
||||
fsm.ShowTxtImgQuestion("로꼬桂閭――攣끽빌俱稜――로텟빌俱稜", 15, 0, 5, () => {
|
||||
fsm.nextState = true;
|
||||
});
|
||||
@ -35,7 +44,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -86,12 +94,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
fsm.Unlight("肺泡听诊器位置2");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("로텟桂閭포貫零1");
|
||||
@ -99,17 +112,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
}
|
||||
if (step2_kh)
|
||||
{
|
||||
fsm.ShowTzq(PositionValue);
|
||||
}
|
||||
}
|
||||
public override void OnStateExit()
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step2_kh = false;
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,25 +7,43 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class FeiPaoHuXiYinJianRuoHuoXiaoShi : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "7", "8" };
|
||||
List<string> success = new() { "16", "28" };
|
||||
Coroutine cor;
|
||||
string audioName = "31--肺泡呼吸音减弱或消失";
|
||||
bool step2_kh;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("肺泡听诊器位置1");
|
||||
fsm.Light("肺泡听诊器位置2");
|
||||
fsm.ShowArrow("将实物听诊器放置于乳房下部进行听诊。", "肺泡听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:16,28;SONG:31,31;%");
|
||||
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
||||
{
|
||||
step2_kh = true;
|
||||
fsm.HideTzq();
|
||||
fsm.ShowTxtImgQuestion("肺部听诊——异常呼吸音——异常肺泡呼吸音——肺泡呼吸音减弱或消失", 17, 0, 5, () => {
|
||||
fsm.ChangeState("GanLuoYin");
|
||||
});
|
||||
}
|
||||
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
||||
{
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("肺泡听诊器位置1");
|
||||
fsm.Light("肺泡听诊器位置2");
|
||||
fsm.ShowArrow("将实物听诊器放置于乳房下部进行听诊。", "肺泡听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -76,12 +94,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
fsm.Unlight("肺泡听诊器位置2");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
@ -89,17 +112,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
}
|
||||
if (step2_kh)
|
||||
{
|
||||
fsm.ShowTzq(PositionValue);
|
||||
}
|
||||
}
|
||||
public override void OnStateExit()
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step2_kh = false;
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,14 +7,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class FeiPaoHuXiYinZengQiang : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "7", "8" };
|
||||
List<string> success = new() { "16", "28" };
|
||||
string audioName = "32--肺泡呼吸音增强";
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
Coroutine cor;
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:16,28;SONG:32,32;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("肺泡听诊器位置1");
|
||||
@ -25,7 +32,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -76,12 +82,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
fsm.Unlight("肺泡听诊器位置2");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
@ -89,7 +100,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -99,7 +110,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -3,17 +3,39 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
public class GanLuoYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step2_kh;
|
||||
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
step2_kh = true;
|
||||
fsm.HideTzq();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:8,9;SONG:43;%");
|
||||
fsm.ShowTxtImgQuestion("·Î²¿ÌýÕ¡ªÒì³£ºôÎüÒô¡ª¡ª†ªÒô¡ª¡ª¸É†ªÒô", 18, 0, 5, () => {
|
||||
fsm.ChangeState("DiDiaoGanLuoYin");
|
||||
});
|
||||
}
|
||||
public override void OnStateStay()
|
||||
{
|
||||
base.OnStateStay();
|
||||
if (step2_kh)
|
||||
{
|
||||
fsm.ShowTzq(PositionValue);
|
||||
}
|
||||
}
|
||||
public override void OnStateExit()
|
||||
{
|
||||
base.OnStateExit();
|
||||
step2_kh = false;
|
||||
fsm.HideTzq();
|
||||
fsm.nextState = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,17 +3,38 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
public class GanLuoYin_ShiLuoYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step2_kh;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
step2_kh = true;
|
||||
fsm.HideTzq();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:8,9,3;SONG:43,43,38;%");
|
||||
fsm.ShowTxtImgQuestion("·Î²¿ÌýÕ¡ªÒì³£ºôÎüÒô¡ª¡ª†ªÒô¡ª¡ª¸É†ªÒô&ʪ†ªÒô", 21, 0, 5, () => {
|
||||
fsm.ChangeState("XiongMoMoCaYin");
|
||||
});
|
||||
}
|
||||
public override void OnStateStay()
|
||||
{
|
||||
base.OnStateStay();
|
||||
if (step2_kh)
|
||||
{
|
||||
fsm.ShowTzq(PositionValue);
|
||||
}
|
||||
}
|
||||
public override void OnStateExit()
|
||||
{
|
||||
base.OnStateExit();
|
||||
step2_kh = false;
|
||||
fsm.HideTzq();
|
||||
fsm.nextState = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,14 +7,22 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class GaoDiaoGanLuoYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "3", "4", "5", "6" };
|
||||
List<string> success = new() { "8", "9" };
|
||||
Coroutine cor;
|
||||
string audioName = "43--高调干啰音(哨笛音)";
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:8,9;SONG:43,43;%");
|
||||
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置1");
|
||||
@ -27,7 +35,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,12 +85,19 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置1");
|
||||
fsm.Unlight("支气管肺泡听诊器位置2");
|
||||
fsm.Unlight("支气管肺泡听诊器位置3");
|
||||
fsm.Unlight("支气管肺泡听诊器位置4");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置1");
|
||||
@ -93,7 +107,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -103,7 +117,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,14 +7,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class HuXiYinYanChang : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "7", "8" };
|
||||
List<string> success = new() { "16", "28" };
|
||||
string audioName = "呼吸音延长";
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
Coroutine cor;
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:16,28;SONG:1,1;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("肺泡听诊器位置1");
|
||||
@ -25,7 +32,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -76,12 +82,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
fsm.Unlight("肺泡听诊器位置2");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
@ -89,7 +100,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -99,7 +110,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateEnter();
|
||||
fsm.ShowTxtQuestion("胸部体表标志——肩胛骨肩胛下角", 1, 0, 2, () => {
|
||||
fsm.nextState = true;
|
||||
fsm.ChangeState("QianZhengZhongXian");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -7,27 +7,30 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class KaiBanYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "11" };
|
||||
List<string> success = new() { "15" };
|
||||
string audioName = "68--开瓣音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
|
||||
GameManager.Instance.multiObjectController.RotateAllTo0(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于左锁骨中线与第5肋间交点内0.5cm处进行听诊。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:68;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于左锁骨中线与第5肋间交点内0.5cm处进行听诊。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,19 +81,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -100,7 +107,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,27 +7,45 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class LianXuXingZaYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "5" };
|
||||
List<string> success = new() { "8" };
|
||||
string audioName = "80--连续性杂音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
bool step2_kh;
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
|
||||
GameManager.Instance.multiObjectController.RotateAllTo0(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置3");
|
||||
fsm.ShowArrow("将实物听诊器放置于胸骨右缘第2肋间处进行听诊。", "支气管肺泡听诊器位置3", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:8;SONG:80;%");
|
||||
if (fsm.main_gameModel.modeType == ZXKFramework.ModeType.KaoHe)
|
||||
{
|
||||
step2_kh = true;
|
||||
fsm.HideTzq();
|
||||
fsm.ShowTxtImgQuestion("心脏听诊——心脏杂音——连续性杂音", 26, 0, 5, () => {
|
||||
fsm.nextState = true;
|
||||
});
|
||||
}
|
||||
if (fsm.main_gameModel.modeType == ZXKFramework.ModeType.ShiXun)
|
||||
{
|
||||
GameManager.Instance.multiObjectController.RotateAllTo0(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置3");
|
||||
fsm.ShowArrow("将实物听诊器放置于胸骨右缘第2肋间处进行听诊。", "支气管肺泡听诊器位置3", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
}
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,29 +96,37 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置3");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置3");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
}
|
||||
if (step2_kh)
|
||||
{
|
||||
fsm.ShowTzq(PositionValue);
|
||||
}
|
||||
}
|
||||
public override void OnStateExit()
|
||||
{
|
||||
base.OnStateExit();
|
||||
step2_kh = false;
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,14 +7,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class NianFaYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "7", "8" };
|
||||
List<string> success = new() { "16", "28" };
|
||||
string audioName = "42--湿罗音捻发音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:16,28;SONG:42,42;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("肺泡听诊器位置1");
|
||||
@ -25,7 +32,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -76,12 +82,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
fsm.Unlight("肺泡听诊器位置2");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
@ -89,7 +100,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -99,7 +110,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -1,21 +1,29 @@
|
||||
using FSM;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using YiLiao.Main;
|
||||
using ZXKFramework;
|
||||
namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
public class QiGuanHuXiYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "1";
|
||||
string success = "3";
|
||||
string audioName = "气管呼吸音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.multiObjectController.RotateAllTo0(() => {
|
||||
GameManager.Instance.senSor.SendFunction("#ID:3;SONG:1;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("气管听诊器位置1");
|
||||
@ -26,7 +34,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -74,23 +81,25 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public override void OnStateStay()
|
||||
{
|
||||
base.OnStateStay();
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("Æø¹ÜÌýÕïÆ÷λÖÃ1");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("气管听诊器位置1");
|
||||
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if(!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && success != PositionValue)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -100,7 +109,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,13 +7,20 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class SanJianBanQu : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "13","14" };
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:13,14;SONG:54,54;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("胸骨左缘第4肋间听诊器位置1");
|
||||
@ -24,7 +31,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -71,19 +77,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("胸骨左缘第4肋间听诊器位置1");
|
||||
fsm.Unlight("胸骨左缘第5肋间听诊器位置1");
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("胸骨左缘第4肋间听诊器位置1");
|
||||
fsm.Unlight("胸骨左缘第5肋间听诊器位置1");
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -93,7 +103,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,14 +7,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class SanJianBanQu2 : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "13", "14" };
|
||||
string audioName = "75--三尖瓣区收缩期杂音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:13,14;SONG:75,75;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("胸骨左缘第4肋间听诊器位置1");
|
||||
@ -25,7 +32,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -76,12 +82,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("胸骨左缘第4肋间听诊器位置1");
|
||||
fsm.Unlight("胸骨左缘第5肋间听诊器位置1");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("胸骨左缘第4肋间听诊器位置1");
|
||||
@ -89,7 +100,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -99,7 +110,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,14 +7,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class SanJianBanQu3 : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "13", "14" };
|
||||
string audioName = "79--三尖瓣区舒张期杂音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:13,14;SONG:79,79;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("胸骨左缘第4肋间听诊器位置1");
|
||||
@ -25,7 +32,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -76,12 +82,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("胸骨左缘第4肋间听诊器位置1");
|
||||
fsm.Unlight("胸骨左缘第5肋间听诊器位置1");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("胸骨左缘第4肋间听诊器位置1");
|
||||
@ -89,7 +100,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -99,7 +110,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -3,17 +3,38 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
public class ShiLuoYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step2_kh;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
step2_kh = true;
|
||||
fsm.HideTzq();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:3;SONG:38;%");
|
||||
fsm.ShowTxtImgQuestion("·Î²¿ÌýÕ¡ªÒì³£ºôÎüÒô¡ª¡ª†ªÒô¡ª¡ªÊª†ªÒô", 20, 0, 5, () => {
|
||||
fsm.ChangeState("GanLuoYin_ShiLuoYin");
|
||||
});
|
||||
}
|
||||
public override void OnStateStay()
|
||||
{
|
||||
base.OnStateStay();
|
||||
if (step2_kh)
|
||||
{
|
||||
fsm.ShowTzq(PositionValue);
|
||||
}
|
||||
}
|
||||
public override void OnStateExit()
|
||||
{
|
||||
base.OnStateExit();
|
||||
step2_kh = false;
|
||||
fsm.HideTzq();
|
||||
fsm.nextState = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,27 +7,30 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class ShouSuoZhongWanQiKaLaYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "11" };
|
||||
List<string> success = new() { "15" };
|
||||
string audioName = "71--收缩中、晚期喀喇音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
|
||||
GameManager.Instance.multiObjectController.RotateAllTo0(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于左锁骨中线与第5肋间交点内0.5cm处进行听诊。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:71;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于左锁骨中线与第5肋间交点内0.5cm处进行听诊。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,19 +81,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -100,7 +107,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,27 +7,30 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class ShuZhangWanQiBenMaLv : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "11" };
|
||||
List<string> success = new() { "15" };
|
||||
string audioName = "66--舒张晚期奔马律";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
|
||||
GameManager.Instance.multiObjectController.RotateAllTo0(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于左锁骨中线与第5肋间交点内0.5cm处进行听诊。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:66;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于左锁骨中线与第5肋间交点内0.5cm处进行听诊。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,19 +81,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -100,7 +107,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,27 +7,45 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class ShuZhangZaoQiBenMaLv : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "11" };
|
||||
List<string> success = new() { "15" };
|
||||
string audioName = "65--舒张早期奔马律";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
bool step2_kh;
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
|
||||
GameManager.Instance.multiObjectController.RotateAllTo0(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于左锁骨中线与第5肋间交点内0.5cm处进行听诊。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:65;%");
|
||||
if (fsm.main_gameModel.modeType == ZXKFramework.ModeType.KaoHe)
|
||||
{
|
||||
step2_kh = true;
|
||||
fsm.HideTzq();
|
||||
fsm.ShowTxtImgQuestion("心脏听诊——额外心音——舒张期额外心音——舒张早期奔马律", 25, 0, 5, () => {
|
||||
fsm.ChangeState("LianXuXingZaYin");
|
||||
});
|
||||
}
|
||||
if (fsm.main_gameModel.modeType == ZXKFramework.ModeType.ShiXun)
|
||||
{
|
||||
GameManager.Instance.multiObjectController.RotateAllTo0(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于左锁骨中线与第5肋间交点内0.5cm处进行听诊。", "左锁骨中线与第5肋间交点内0.5cm听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,29 +96,37 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
}
|
||||
if (step2_kh)
|
||||
{
|
||||
fsm.ShowTzq(PositionValue);
|
||||
}
|
||||
}
|
||||
public override void OnStateExit()
|
||||
{
|
||||
base.OnStateExit();
|
||||
step2_kh = false;
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,14 +7,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class VelcroLuoYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "7", "8" };
|
||||
List<string> success = new() { "16", "28" };
|
||||
string audioName = "Velcro啰音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:16,28;SONG:1,1;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("肺泡听诊器位置1");
|
||||
@ -25,7 +32,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -76,12 +82,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
fsm.Unlight("肺泡听诊器位置2");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
@ -89,7 +100,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -99,7 +110,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,14 +7,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class XiShiLuoYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "7", "8" };
|
||||
List<string> success = new() { "16", "28" };
|
||||
string audioName = "40--湿罗音小水泡音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:16,28;SONG:40,40;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("肺泡听诊器位置1");
|
||||
@ -25,7 +32,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -76,12 +82,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
fsm.Unlight("肺泡听诊器位置2");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
@ -89,7 +100,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -99,7 +110,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,25 +7,43 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class XinBaoMoCaYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "12", "13" };
|
||||
List<string> success = new() { "11", "13" };
|
||||
string audioName = "81--心包摩擦音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
bool step2_kh;
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("胸骨左缘第3肋间听诊器位置1");
|
||||
fsm.Light("胸骨左缘第4肋间听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于胸骨左缘第3、4肋间进行听诊。", "胸骨左缘第3肋间听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:11,13;SONG:81,81;%");
|
||||
if (fsm.main_gameModel.modeType == ZXKFramework.ModeType.KaoHe)
|
||||
{
|
||||
step2_kh = true;
|
||||
fsm.HideTzq();
|
||||
fsm.ShowTxtImgQuestion("心脏听诊——心脏杂音——心包摩擦音", 27, 0, 5, () => {
|
||||
fsm.nextState = true;
|
||||
});
|
||||
}
|
||||
if (fsm.main_gameModel.modeType == ZXKFramework.ModeType.ShiXun)
|
||||
{
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("胸骨左缘第3肋间听诊器位置1");
|
||||
fsm.Light("胸骨左缘第4肋间听诊器位置1");
|
||||
fsm.ShowArrow("将实物听诊器放置于胸骨左缘第3、4肋间进行听诊。", "胸骨左缘第3肋间听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -77,12 +95,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("胸骨左缘第3肋间听诊器位置1");
|
||||
fsm.Unlight("胸骨左缘第4肋间听诊器位置1");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("胸骨左缘第3肋间听诊器位置1");
|
||||
@ -90,17 +113,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
}
|
||||
if (step2_kh)
|
||||
{
|
||||
fsm.ShowTzq(PositionValue);
|
||||
}
|
||||
}
|
||||
public override void OnStateExit()
|
||||
{
|
||||
base.OnStateExit();
|
||||
step2_kh = false;
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,14 +6,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class XinLv : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "11";
|
||||
string success = "15";
|
||||
string audioName = "心率";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:15;SONG:1;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.PlayClip("二尖瓣区");
|
||||
@ -24,7 +31,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -75,19 +81,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左锁骨中线与第5肋间交点内0.5cm听诊器位置1");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && PositionValue != success)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -97,7 +107,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,27 +7,44 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class XiongMoMoCaYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标
|
||||
List<string> success = new() { "9", "10"};
|
||||
List<string> success = new() {"23", "19"};
|
||||
string audioName = "45--胸膜摩擦音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
bool step2_kh;
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
id = "";
|
||||
fsm.PlayClip("胸膜摩擦音", () => {
|
||||
fsm.Light("左右腋中线第5、6肋间听诊器位置1_taigebo");
|
||||
fsm.ShowArrow("将实物听诊器放置于左右腋中线第5、6肋间进行听诊。", "左右腋中线第5、6肋间听诊器位置1_taigebo", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:19,23;SONG:45,45;%");
|
||||
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
||||
{
|
||||
step2_kh = true;
|
||||
fsm.HideTzq();
|
||||
fsm.ShowTxtImgQuestion("肺部听诊——异常呼吸音——胸膜摩擦音", 22, 0, 5, () => {
|
||||
fsm.ChangeState("ErJianBanQu");
|
||||
});
|
||||
}
|
||||
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
||||
{
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.PlayClip("胸膜摩擦音", () => {
|
||||
fsm.Light("左右腋中线第5、6肋间听诊器位置1_taigebo");
|
||||
fsm.ShowArrow("将实物听诊器放置于左右腋中线第5、6肋间进行听诊。", "左右腋中线第5、6肋间听诊器位置1_taigebo", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
}
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,30 +95,37 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左右腋中线第5、6肋间听诊器位置1_taigebo");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
Debug.Log(id);
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("左右腋中线第5、6肋间听诊器位置1_taigebo");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success[0].Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
}
|
||||
if (step2_kh)
|
||||
{
|
||||
fsm.ShowTzq(PositionValue);
|
||||
}
|
||||
}
|
||||
public override void OnStateExit()
|
||||
{
|
||||
base.OnStateExit();
|
||||
step2_kh = false;
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,14 +7,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class YiChangZhiQiGuanFeiPaoHuXiYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "7", "8" };
|
||||
List<string> success = new() { "16", "28" };
|
||||
string clipName = "37--异常支气管肺泡呼吸音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:16,28;SONG:37,37;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("肺泡听诊器位置1");
|
||||
@ -25,7 +32,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -76,12 +82,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
fsm.Unlight("肺泡听诊器位置2");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
@ -89,7 +100,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -99,7 +110,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,14 +7,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class YiChangZhiQiGuanHuXiYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "7", "8" };
|
||||
List<string> success = new() { "16", "28" };
|
||||
string audioName = "36--异常支气管呼吸音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:16,28;SONG:36,36;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("肺泡听诊器位置1");
|
||||
@ -25,7 +32,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -76,12 +82,17 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
fsm.Unlight("肺泡听诊器位置2");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("肺泡听诊器位置1");
|
||||
@ -89,7 +100,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -99,7 +110,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,27 +7,45 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class ZhiQiGuanFeiPaoHuXiYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() {"3", "4", "5", "6"};
|
||||
List<string> success = new() {"8", "9"};
|
||||
Coroutine cor;
|
||||
string audioName = "29--支气管肺泡呼吸音";
|
||||
bool step2_kh;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置1");
|
||||
fsm.Light("支气管肺泡听诊器位置2");
|
||||
fsm.Light("支气管肺泡听诊器位置3");
|
||||
fsm.Light("支气管肺泡听诊器位置4");
|
||||
fsm.ShowArrow("将实物听诊器放置于胸骨两侧第1、2肋间隙处进行听诊。", "支气管肺泡听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:8,9;SONG:29,29;%");
|
||||
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
||||
{
|
||||
step2_kh = true;
|
||||
fsm.HideTzq();
|
||||
fsm.ShowTxtImgQuestion("肺部听诊——正常呼吸音——支气管肺泡呼吸音", 16, 0, 5, () => {
|
||||
fsm.nextState = true;
|
||||
});
|
||||
}
|
||||
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
||||
{
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置1");
|
||||
fsm.Light("支气管肺泡听诊器位置2");
|
||||
fsm.Light("支气管肺泡听诊器位置3");
|
||||
fsm.Light("支气管肺泡听诊器位置4");
|
||||
fsm.ShowArrow("将实物听诊器放置于胸骨两侧第1、2肋间隙处进行听诊。", "支气管肺泡听诊器位置1", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,12 +96,19 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置1");
|
||||
fsm.Unlight("支气管肺泡听诊器位置2");
|
||||
fsm.Unlight("支气管肺泡听诊器位置3");
|
||||
fsm.Unlight("支气管肺泡听诊器位置4");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置1");
|
||||
@ -93,17 +118,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
}
|
||||
if (step2_kh)
|
||||
{
|
||||
fsm.ShowTzq(PositionValue);
|
||||
}
|
||||
}
|
||||
public override void OnStateExit()
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step2_kh = false;
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,16 +6,26 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class ZhiQiGuanHuXiYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
bool step2_kh;
|
||||
//成功的标志
|
||||
string success = "2";
|
||||
string success = "3";
|
||||
string audioName = "28--支气管呼吸音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:3;SONG:28;%");
|
||||
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
||||
{
|
||||
fsm.HideTzq();
|
||||
step2_kh = true;
|
||||
fsm.ShowTxtImgQuestion("肺部听诊——正常呼吸音——支气管呼吸音", 14, 0, 5, () => {
|
||||
fsm.nextState = true;
|
||||
});
|
||||
@ -32,7 +42,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -83,30 +92,38 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("Ö§Æø¹ÜÌýÕïÆ÷λÖÃ1");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管听诊器位置1");
|
||||
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue!="0" && success != PositionValue)
|
||||
{
|
||||
False();
|
||||
}
|
||||
}
|
||||
if (step2_kh)
|
||||
{
|
||||
fsm.ShowTzq(PositionValue);
|
||||
Debug.Log(PositionValue);
|
||||
}
|
||||
}
|
||||
public override void OnStateExit()
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step2_kh = false;
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,14 +7,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class ZhongShiLuoYin : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "2";
|
||||
string success = "3";
|
||||
string audioName = "39--中湿罗音";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:3;SONG:39;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管听诊器位置1");
|
||||
@ -24,7 +31,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -75,20 +81,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("Ö§Æø¹ÜÌýÕïÆ÷λÖÃ1");
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管听诊器位置1");
|
||||
|
||||
Audio();
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -98,7 +107,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,13 +6,20 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class ZhuDongMaiBanDiErTingZhenQu : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "12";
|
||||
string success = "11";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:11;SONG:54;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("胸骨左缘第3肋间听诊器位置1");
|
||||
@ -22,7 +29,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -69,19 +75,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("胸骨左缘第3肋间听诊器位置1");
|
||||
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("胸骨左缘第3肋间听诊器位置1");
|
||||
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && PositionValue != success)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -91,7 +101,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -6,13 +6,20 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class ZhuDongMaiBanQu : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
string success = "5";
|
||||
string success = "8";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
GameManager.Instance.senSor.SendFunction("#ID:8;SONG:54;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置3");
|
||||
@ -22,7 +29,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -69,19 +75,21 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success;
|
||||
fsm.ShowTzq(success);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("Ö§Æø¹Ü·ÎÅÝÌýÕïÆ÷λÖÃ3");
|
||||
Success();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (id == success)
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (PositionValue == success)
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置3");
|
||||
|
||||
Success();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && id != success)
|
||||
else if (PositionValue != "0" && PositionValue != success)
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -91,7 +99,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,27 +7,30 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class ZhuDongMaiBanQu2 : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "5" };
|
||||
List<string> success = new() { "8" };
|
||||
string audioName = "73--主动脉瓣狭窄";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
|
||||
GameManager.Instance.multiObjectController.RotateAllTo0(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置3");
|
||||
fsm.ShowArrow("将实物听诊器放置于胸骨右缘第2肋间处进行听诊。", "支气管肺泡听诊器位置3", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:8;SONG:73;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置3");
|
||||
fsm.ShowArrow("将实物听诊器放置于胸骨右缘第2肋间处进行听诊。", "支气管肺泡听诊器位置3", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,19 +81,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置3");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置3");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -100,7 +107,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -7,27 +7,30 @@ namespace YiLiao.XinFeiTingZhen
|
||||
public class ZhuDongMaiBanQu3 : FsmState<FSMManager>
|
||||
{
|
||||
bool step1;
|
||||
string id;
|
||||
//成功的标志
|
||||
List<string> success = new() { "5" };
|
||||
List<string> success = new() { "8" };
|
||||
string audioName = "77--主动脉瓣关闭不全";
|
||||
Coroutine cor;
|
||||
string PositionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameManager.Instance.senSor.GetSensor<TZQ_Sensor>().positionValue.ToString();
|
||||
}
|
||||
}
|
||||
public override void OnStateEnter()
|
||||
{
|
||||
base.OnStateEnter();
|
||||
|
||||
GameManager.Instance.multiObjectController.RotateAllTo0(() => {
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置3");
|
||||
fsm.ShowArrow("将实物听诊器放置于胸骨右缘第2肋间处进行听诊。", "支气管肺泡听诊器位置3", 0, 999);
|
||||
Countdown();
|
||||
});
|
||||
GameManager.Instance.senSor.SendFunction("#ID:8;SONG:77;%");
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowTip(0);
|
||||
fsm.Light("支气管肺泡听诊器位置3");
|
||||
fsm.ShowArrow("将实物听诊器放置于胸骨右缘第2肋间处进行听诊。", "支气管肺泡听诊器位置3", 0, 999);
|
||||
Countdown();
|
||||
}
|
||||
void Countdown()
|
||||
{
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
step1 = true;
|
||||
GameManager.Instance.uiManager.ShowUI<CountdownPanel>();
|
||||
GameManager.Instance.uiManager.GetUI<CountdownPanel>().StartCountdown(() => {
|
||||
@ -78,19 +81,23 @@ namespace YiLiao.XinFeiTingZhen
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.L) && step1)
|
||||
{
|
||||
id = success[0];
|
||||
fsm.ShowTzq(success[0]);
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置3");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
if (step1)
|
||||
{
|
||||
fsm.ShowTzq(id);
|
||||
if (success.Contains(id))
|
||||
fsm.ShowTzq(PositionValue);
|
||||
if (success.Contains(PositionValue))
|
||||
{
|
||||
fsm.HideArrow();
|
||||
fsm.Unlight("支气管肺泡听诊器位置3");
|
||||
Success();
|
||||
Audio();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(id) && !success.Contains(id))
|
||||
else if (PositionValue != "0" && !success.Contains(PositionValue))
|
||||
{
|
||||
False();
|
||||
}
|
||||
@ -100,7 +107,6 @@ namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
base.OnStateExit();
|
||||
fsm.HideTzq();
|
||||
id = "";
|
||||
Game.Instance.IEnumeratorManager.Stop(cor);
|
||||
fsm.nextState = false;
|
||||
}
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
/// 不规则区域Button
|
||||
/// </summary>
|
||||
[RequireComponent(typeof(RectTransform))]
|
||||
[RequireComponent(typeof(Image))]
|
||||
public class IrregulaButton : MonoBehaviour
|
||||
{
|
||||
[Tooltip("设定Sprite响应的Alpha阈值")]
|
||||
[Range(0, 0.5f)]
|
||||
public float alpahThreshold = 0.5f;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
var image = this.GetComponent<Image>();
|
||||
if (null != image)
|
||||
{
|
||||
image.alphaHitTestMinimumThreshold = alpahThreshold;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 783800fc1d8b8044d925ecb95364ab6a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -21,19 +21,19 @@ namespace YiLiao.XinFeiTingZhen
|
||||
}
|
||||
public void SetRightColor()
|
||||
{
|
||||
normalImg.gameObject.SetActive(false);
|
||||
//normalImg.gameObject.SetActive(false);
|
||||
rightImg.gameObject.SetActive(true);
|
||||
falseImg.gameObject.SetActive(false);
|
||||
}
|
||||
public void SetFalseColor()
|
||||
{
|
||||
normalImg.gameObject.SetActive(false);
|
||||
//normalImg.gameObject.SetActive(false);
|
||||
rightImg.gameObject.SetActive(false);
|
||||
falseImg.gameObject.SetActive(true);
|
||||
}
|
||||
public void SetNormalColor()
|
||||
{
|
||||
normalImg.gameObject.SetActive(true);
|
||||
//normalImg.gameObject.SetActive(true);
|
||||
rightImg.gameObject.SetActive(false);
|
||||
falseImg.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using ZXKFramework;
|
||||
using static UnityEditor.Progress;
|
||||
|
||||
namespace YiLiao.XinFeiTingZhen
|
||||
{
|
||||
|
||||
@ -102,6 +102,7 @@ namespace YiLiao.XinFeiTingZhen
|
||||
}
|
||||
private void Next()
|
||||
{
|
||||
ChatUI.Instance.CloseChatTxt();
|
||||
SetActive(false);
|
||||
subBtn.gameObject.SetActive(true);
|
||||
nextBtn.gameObject.SetActive(false);
|
||||
|
||||
@ -286,7 +286,14 @@ PlayerSettings:
|
||||
AndroidMinifyDebug: 0
|
||||
AndroidValidateAppBundleSize: 1
|
||||
AndroidAppBundleSizeToValidate: 150
|
||||
m_BuildTargetIcons: []
|
||||
m_BuildTargetIcons:
|
||||
- m_BuildTarget:
|
||||
m_Icons:
|
||||
- serializedVersion: 2
|
||||
m_Icon: {fileID: 2800000, guid: 85ed46999ddee77499fe7b60457ac9e4, type: 3}
|
||||
m_Width: 128
|
||||
m_Height: 128
|
||||
m_Kind: 0
|
||||
m_BuildTargetPlatformIcons: []
|
||||
m_BuildTargetBatching:
|
||||
- m_BuildTarget: Standalone
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
UnityConnectSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 1
|
||||
m_Enabled: 0
|
||||
m_Enabled: 1
|
||||
m_TestMode: 0
|
||||
m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
|
||||
m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user