修复合并导致的bug

This commit is contained in:
2024-12-12 20:38:48 +08:00
parent 27b003a758
commit 790324fef8
5 changed files with 536 additions and 623 deletions
@@ -125,8 +125,3 @@ public class HeatMapController : MonoBehaviour
}
}
float Map(float value, float minSource, float maxSource, float minTarget, float maxTarget)
{
return minTarget + (value - minSource) * (maxTarget - minTarget) / (maxSource - minSource);
}
}
@@ -44,12 +44,6 @@ public class OscilloscopeController : MonoBehaviour
set
{
heatNum = value;
// 每次设置 heatNum 时,让 otherScript.A 同步更新
// if (hm != null)
// {
// hm.Tempture = heatNum;
// }
}
}
@@ -175,63 +169,36 @@ public class OscilloscopeController : MonoBehaviour
// DialogController.Instance.SetVariable("$ViewToDeepIn",trimmedString);
// DialogController.Instance.StartDialogNode("DeepInView");
}
else if (heatNum > 0)
else if(heatNum>0)
{
screenText.text = "模块过热,无法深入";
//transitionManager.SetViewAvailability(trimmedString, true);
//DeepInButton.interactable=false;
//HandleDeepIn();
}
else if (currentSocket.targetData.HasExternalError())
{
transitionManager.SetViewAvailability(trimmedString, true);
DeepInButton.interactable = false;
HandleDeepIn();
}
else
{
StartCoroutine(ScanForError(trimmedString)); // 启动扫描协程
}
}
private void DeepInexecution()
{
DialogController.Instance.StartDialogNode(yarnString);
// DialogController.Instance.SetVariable("$ViewToDeepIn",trimmedString);
// DialogController.Instance.StartDialogNode("DeepInView");
}
else if(heatNum>0)
{
screenText.text="模块过热,无法深入";
screenText.color=Color.red;
//transitionManager.SetViewAvailability(trimmedString, true);
//DeepInButton.interactable=false;
//HandleDeepIn();
}
else if(currentSocket.targetData.IsRunning())
{
screenText.text="记忆正在被外部连续调取,无法进入";
screenText.color=Color.red;
//waveformVisualizer.gameObject.SetActive(false);
// return;
}
else if(currentSocket.targetData.HasExternalError())
{
transitionManager.SetViewAvailability(trimmedString, true);
DeepInButton.interactable=false;
HandleDeepIn();
}
else if(currentSocket.targetData.IsRunning())
{
screenText.text="记忆正在被外部连续调取,无法进入";
screenText.color=Color.red;
}
else
{
StartCoroutine(ScanForError(trimmedString)); // 启动扫描协程
}
else if(currentSocket.targetData.HasExternalError())
{
transitionManager.SetViewAvailability(trimmedString, true);
DeepInButton.interactable=false;
HandleDeepIn();
}
else
{
StartCoroutine(ScanForError(trimmedString)); // 启动扫描协程
}
}
}
private void DeepInexecution()
{
string originalString = currentSocket.name;
@@ -244,17 +211,7 @@ private void DeepInexecution()
DialogController.OnDialogueComplete-=DeepInexecution;
}
private void HandleDeepIn()
{
if(currentSocket.notAlowedDeep)
{
screenText.text="特殊保护,禁止深入模块";
DeepInButton.interactable=true;
phaseSlider.interactable=true;
//screenText.text="";
plug.Enable_plugInput();
DialogController.OnDialogueComplete -= DeepInexecution;
}
private void HandleDeepIn()
{
@@ -262,15 +219,6 @@ private void HandleDeepIn()
{
DialogController.OnDialogueComplete+=DeepInexecution;
}
}
else
{
// if(!currentSocket.notAlowedDeep)
// {
// DeepInexecution();
// }
DeepInexecution();
string originalString = currentSocket.name;
string trimmedString = originalString.Replace("Socket", "");
@@ -291,6 +239,7 @@ private void HandleDeepIn()
}
}
}
void HandleExternalError()
{