修改流程
This commit is contained in:
parent
71757aab24
commit
383af005d8
Binary file not shown.
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
if (spStepID <= d_Scheme.CurrentProcess.CurrentSubProcess.subProcessStepes[spStepcount - 1].id)
|
||||
{
|
||||
HandoverSubProcessStep(spStepID);
|
||||
|
||||
|
||||
Debug.Log("进入下一步子流程步骤");
|
||||
return true;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
{
|
||||
HandoverSubProcess(spID, 0);
|
||||
GameManager.EventMgr.EventTrigger<int>(Enum_EventType.SwitchSubProcess, d_Scheme.CurrentProcess.CurrentSubProcessId);
|
||||
|
||||
|
||||
Debug.Log("进入下一步子流程");
|
||||
return true;
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
HandoverProcess(pID, 0, 0);
|
||||
GameManager.EventMgr.EventTrigger<int>(Enum_EventType.SwitchSubProcessStep, d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStepId);
|
||||
GameManager.EventMgr.EventTrigger<int>(Enum_EventType.SwitchSubProcess, d_Scheme.CurrentProcess.CurrentSubProcessId);
|
||||
|
||||
|
||||
Debug.Log("进入下一步流程");
|
||||
return true;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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>();
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue