修改流程

This commit is contained in:
YangHua 2024-08-25 18:25:29 +08:00
parent 71757aab24
commit 383af005d8
7 changed files with 45 additions and 33 deletions

Binary file not shown.

View File

@ -14,6 +14,7 @@ public class Device_Base : PermanentTriggerBase
if (GameManager.RunModelMgr == null && GameManager.RunModelMgr.SceneType == E_SceneType.Site)
{
base.OnStart();
Debug.Log("Device_Base PermanentTriggerBase");
}
}

View File

@ -48,10 +48,10 @@ public class Device_CabinetDoor : Device_Base
}
protected override void OnMDown()
{
if (LiveSceneManager.Instance.currentTool != null && LiveSceneManager.Instance.currentTool.name == "Ñéµç±Ê") return;
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, true) == 0)
{
base.OnMDown();
if (LiveSceneManager.Instance.currentTool != null && LiveSceneManager.Instance.currentTool.name == "Ñéµç±Ê") return;
if (isOpen)
{
Close();

View File

@ -31,7 +31,7 @@ public class Tool_TestPen : Tool_Base
return;
}
//柜门
//螺丝
Tool_Base tb = hit.transform.GetComponent<Tool_Base>();
if (tb != null)
{
@ -66,6 +66,7 @@ public class Tool_TestPen : Tool_Base
{
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(device_base.triggerName, true) == 0)
{
Debug.Log("Test(Device_Base device_base)");
if (device_base.deviceType == DeviceType._插座)
{
var tmp = ((Device_Socket)device_base);
@ -74,10 +75,12 @@ public class Tool_TestPen : Tool_Base
transform.eulerAngles = tmp.testPosAndRot.eulerAngles;
Debug.Log("计量柜_插座 已验电");
isFlicker = tmp.hasElectricity;
}
else if (device_base.deviceType == DeviceType._柜门)
{
var tmp = ((Device_CabinetDoor)device_base);
//位置移动
transform.position = tmp.testPosAndRot.position;
transform.localEulerAngles = tmp.testPosAndRot.localEulerAngles;
@ -89,24 +92,24 @@ public class Tool_TestPen : Tool_Base
}
}
/// <summary>
/// 执行验电操作
/// </summary>
/// <param name="tool_base">被验电设备</param>
public void Test(Tool_Base tool_base)
{
if (tool_base.toolType == ToolType.)
/// <summary>
/// 执行验电操作
/// </summary>
/// <param name="tool_base">被验电设备</param>
public void Test(Tool_Base tool_base)
{
var tmp = ((Tool_Screw)tool_base);
//位置移动
transform.position = tmp.installPos.position;
transform.localEulerAngles = tmp.installPos.localEulerAngles;
Debug.Log("螺丝 已验电");
isFlicker = tmp.hasElectricity;
if (tool_base.toolType == ToolType.)
{
var tmp = ((Tool_Screw)tool_base);
//位置移动
transform.position = tmp.installPos.position;
transform.localEulerAngles = tmp.installPos.localEulerAngles;
Debug.Log("螺丝 已验电");
isFlicker = tmp.hasElectricity;
}
screem.materials[0].color = isFlicker ? Color.red : Color.white;
}
screem.materials[0].color = isFlicker ? Color.red : Color.white;
}
}

View File

@ -166,10 +166,7 @@ public class ProcessManager : BaseManager<ProcessManager>
else
{
Debug.Log("按照流程走");
GameManager.UIMgr.ShowPanel<UI_MiddleTipPanel>(E_UI_Layer.Mid, (panel) =>
{
panel.Init($"错误,{d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.tipTitle}");
});
StepErrorTips();
return false;
}
@ -204,10 +201,7 @@ public class ProcessManager : BaseManager<ProcessManager>
}
else
{
GameManager.UIMgr.ShowPanel<UI_MiddleTipPanel>(E_UI_Layer.System, (p) =>
{
p.Init($"错误,{d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.tipTitle}");
});
StepErrorTips();
return 1;
}
}
@ -218,12 +212,24 @@ public class ProcessManager : BaseManager<ProcessManager>
}
}
else
{
StepErrorTips();
return -1;
}
}
private void StepErrorTips()
{
if (GameManager.UIMgr.GetPanel<UI_MiddleTipPanel>())
{
GameManager.UIMgr.GetPanel<UI_MiddleTipPanel>().Init($"错误,{d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.tipTitle}");
}
else
{
GameManager.UIMgr.ShowPanel<UI_MiddleTipPanel>(E_UI_Layer.System, (p) =>
{
p.Init($"错误,请前往{d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.SceneName()}");
p.Init($"错误,{d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.tipTitle}");
});
return -1;
}
}

View File

@ -23,11 +23,13 @@ public class UI_MiddleTipPanel : BasePanel
/// </summary>
private void Hide()
{
StopCoroutine(HideAsync());
StartCoroutine(HideAsync());
}
private IEnumerator HideAsync()
{
yield return new WaitForSeconds(disappear);
UIManager.Instance.HidePanel<UI_MiddleTipPanel>();
GameManager.UIMgr.HidePanel<UI_MiddleTipPanel>();
}
}