修改了插头的功能,增加了插头触发对话,保险起见只触发一次
This commit is contained in:
@@ -123,7 +123,9 @@ public class OscilloscopeController : MonoBehaviour
|
||||
}
|
||||
private void HandlePlugInserted(Plug plug)
|
||||
{
|
||||
DialogController.Instance.SetVariable("$currentSocket",plug.currentSocket.name);
|
||||
string originalString = plug.currentSocket.name;
|
||||
string trimmedString = originalString.Replace("Socket", "");
|
||||
DialogController.Instance.SetVariable("$currentSocket",trimmedString);
|
||||
DialogController.Instance.StartDialogNode("PlugInsert");
|
||||
// 这里可以处理插入后的波形显示逻辑
|
||||
Debug.Log("Plug inserted into the socket, starting waveform display.");
|
||||
@@ -341,10 +343,23 @@ private IEnumerator ScanForError(string trimmedString)
|
||||
if(targetData.HasExternalError())
|
||||
{
|
||||
|
||||
screenText.text="外部错误已关联,可以直接深入";
|
||||
screenText.text="记忆模块,允许直接进入";
|
||||
//waveformVisualizer.gameObject.SetActive(false);
|
||||
return;
|
||||
}
|
||||
else if(currentSocket.targetData.isCorrect)
|
||||
{
|
||||
string originalString = currentSocket.name;
|
||||
string trimmedString = originalString.Replace("Socket", "");
|
||||
screenText.text=trimmedString+ ":未检测到错误";
|
||||
return;
|
||||
}
|
||||
else if(!currentSocket.targetData.isCorrect)
|
||||
{
|
||||
string originalString = currentSocket.name;
|
||||
string trimmedString = originalString.Replace("Socket", "");
|
||||
screenText.text=trimmedString+ ":检测到异常,请寻找错误深入";
|
||||
}
|
||||
|
||||
if(!setInitSliderValue)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user