修复一些状态问题
This commit is contained in:
@@ -28,7 +28,7 @@ public class ClueBoardManager : MonoBehaviour
|
||||
public IEnumerator WaitForClose()
|
||||
{
|
||||
// 这里等待关闭按钮点击事件
|
||||
while (!isBoardOpen)
|
||||
while (isBoardOpen)
|
||||
{
|
||||
yield return null; // 每帧检查一次
|
||||
}
|
||||
|
||||
@@ -45,8 +45,26 @@ public class OscilloscopeController : MonoBehaviour
|
||||
DeepInButton.GetComponent<Button>().onClick.AddListener(DeepIn);
|
||||
screenText.text="";
|
||||
currentSocket=null;
|
||||
if(plug!=null)
|
||||
{
|
||||
plug.OnPlugInserted += HandlePlugInserted;
|
||||
plug.OnPlugRemoved += HandlePlugRemoved;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
private void HandlePlugInserted(Plug plug)
|
||||
{
|
||||
// 这里可以处理插入后的波形显示逻辑
|
||||
Debug.Log("Plug inserted into the socket, starting waveform display.");
|
||||
}
|
||||
|
||||
private void HandlePlugRemoved()
|
||||
{
|
||||
// 这里可以处理移除后的清除波形逻辑
|
||||
screenText.text="";
|
||||
Debug.Log("Plug removed from the socket, stopping waveform display.");
|
||||
}
|
||||
|
||||
public void DeepIn()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user