Merge branch 'main' of http://172.16.1.12/WangWeiZhi/YanCheng_Metrology
This commit is contained in:
commit
4184b24f4b
Binary file not shown.
|
@ -292,7 +292,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 314.875, y: -224}
|
||||
m_AnchoredPosition: {x: 236, y: -224}
|
||||
m_SizeDelta: {x: 100, y: 29}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!222 &5143475168080495406
|
||||
|
@ -395,7 +395,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &5143475168199256130
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -863,7 +863,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 236, y: -224}
|
||||
m_AnchoredPosition: {x: 157.125, y: -224}
|
||||
m_SizeDelta: {x: 100, y: 29}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!222 &5143475170184534651
|
||||
|
|
|
@ -11,9 +11,10 @@ public class Check_JieXian : PermanentTriggerBase
|
|||
/// 是否已检查接线完好
|
||||
/// </summary>
|
||||
public bool isChecked;
|
||||
private void OnMouseDown()
|
||||
protected override void OnMDown()
|
||||
{
|
||||
if (SiteManager.instance.measuringCabinet.jieXian_lines.TrueForAll(a=>a.isConnected) && SiteManager.instance.measuringCabinet.meteringDevice.jieXian_screws.TrueForAll(a=>a.isInstall))
|
||||
base.OnMDown();
|
||||
if (SiteManager.instance.measuringCabinet.jieXian_lines.TrueForAll(a => a.isConnected) && SiteManager.instance.measuringCabinet.meteringDevice.jieXian_screws.TrueForAll(a => a.isInstall))
|
||||
{
|
||||
Invoke("Check", 1);
|
||||
}
|
||||
|
@ -24,19 +25,23 @@ public class Check_JieXian : PermanentTriggerBase
|
|||
/// </summary>
|
||||
public void Check()
|
||||
{
|
||||
Debug.Log("½ÓÏßÍêºÃ");
|
||||
isChecked = true;
|
||||
GetComponent<BoxCollider>().enabled = false;
|
||||
|
||||
if (GameManager.UIMgr != null)
|
||||
if (GameManager.ProcessMgr?.IsRightSubProcessStepsTriggerID(triggerName, true) == 0)
|
||||
{
|
||||
GameObject tip2 = Instantiate<GameObject>(Resources.Load<GameObject>("UI/UI_Tip/TipPanel"),GameManager.UIMgr.canvas.transform);
|
||||
TipPanel tipPanel = tip2.GetComponent<TipPanel>();
|
||||
tipPanel.Init("½ÓÏßÍêºÃ£¡");
|
||||
|
||||
Debug.Log("½ÓÏßÍêºÃ");
|
||||
isChecked = true;
|
||||
GetComponent<BoxCollider>().enabled = false;
|
||||
|
||||
if (GameManager.UIMgr != null)
|
||||
{
|
||||
GameObject tip2 = Instantiate<GameObject>(Resources.Load<GameObject>("UI/UI_Tip/TipPanel"), GameManager.UIMgr.canvas.transform);
|
||||
TipPanel tipPanel = tip2.GetComponent<TipPanel>();
|
||||
tipPanel.Init("½ÓÏßÍêºÃ£¡");
|
||||
}
|
||||
|
||||
//GameManager.ProcessMgr?.IsRightSubProcessStepsTriggerID(triggerName, true);
|
||||
|
||||
base.CallScoreAction(true);
|
||||
}
|
||||
|
||||
GameManager.ProcessMgr?.IsRightSubProcessStepsTriggerID(triggerName, true);
|
||||
|
||||
base.CallScoreAction(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,17 +23,23 @@ public class Tool_BoxSeal : Tool_Base
|
|||
//ÂÝ˿šÉÏÁ˾Ͱ²×°·âÓ¡
|
||||
if (screw == SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_screw_Left && SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_screw_Left.isInstall)
|
||||
{
|
||||
//盖子左封印
|
||||
SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_seal_Left.Install();
|
||||
//打分
|
||||
SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_seal_Left.CallScoreAction(true);
|
||||
if ((triggerAction == null ? 0 : triggerAction.Invoke(screw.triggerName, true)) == 0)
|
||||
{
|
||||
//盖子左封印
|
||||
SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_seal_Left.Install();
|
||||
//打分
|
||||
SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_seal_Left.CallScoreAction(true);
|
||||
}
|
||||
}
|
||||
else if (screw == SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_screw_Right && SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_screw_Right.isInstall)
|
||||
{
|
||||
//盖子右封印
|
||||
SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_seal_Right.Install();
|
||||
//打分
|
||||
SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_seal_Right.CallScoreAction(true);
|
||||
if ((triggerAction == null ? 0 : triggerAction.Invoke(screw.triggerName, true)) == 0)
|
||||
{
|
||||
//盖子右封印
|
||||
SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_seal_Right.Install();
|
||||
//打分
|
||||
SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_seal_Right.CallScoreAction(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public class Tool_TestPen : Tool_Base
|
|||
/// <param name="device_base">被验电设备</param>
|
||||
public void Test(Device_Base device_base)
|
||||
{
|
||||
if ((triggerAction == null ? 0 : triggerAction.Invoke($"{triggerName}+{device_base.triggerName}", true)) == 0)
|
||||
if ((triggerAction == null ? 0 : triggerAction.Invoke($"{triggerName}+{device_base.triggerName}", false)) == 0)
|
||||
{
|
||||
if (device_base.deviceType == DeviceType.计量柜_插座)
|
||||
{
|
||||
|
@ -83,6 +83,7 @@ public class Tool_TestPen : Tool_Base
|
|||
Debug.Log("计量柜_插座 已验电");
|
||||
isFlicker = tmp.hasElectricity;
|
||||
screem.materials[0].color = isFlicker ? Color.red : Color.white;
|
||||
int index = (triggerAction == null ? 0 : triggerAction.Invoke($"{triggerName}+{device_base.triggerName}", true));
|
||||
base.CallScoreAction(null, $"{triggerName}+{device_base.triggerName}");
|
||||
});
|
||||
}
|
||||
|
@ -98,6 +99,7 @@ public class Tool_TestPen : Tool_Base
|
|||
Debug.Log("计量柜_柜门 已验电");
|
||||
isFlicker = tmp.hasElectricity;
|
||||
screem.materials[0].color = isFlicker ? Color.red : Color.white;
|
||||
int index = (triggerAction == null ? 0 : triggerAction.Invoke($"{triggerName}+{device_base.triggerName}", true));
|
||||
base.CallScoreAction(null, $"{triggerName}+{device_base.triggerName}");
|
||||
});
|
||||
}
|
||||
|
|
|
@ -52,8 +52,8 @@ public class Tool_WireStripper : Tool_Base
|
|||
//¼ô¶Ï
|
||||
device_Seal.Cut();
|
||||
isCuning = false;
|
||||
//int result = (triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true));
|
||||
ReBackHead();
|
||||
int result = (triggerAction == null ? 0 : triggerAction.Invoke(device_Seal.triggerName, true));
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
@ -68,7 +68,7 @@ public class Tool_WireStripper : Tool_Base
|
|||
Device_Seal ds = hit.transform.GetComponent<Device_Seal>();
|
||||
if (ds != null)
|
||||
{
|
||||
if ((triggerAction == null ? 0 : triggerAction.Invoke(ds.triggerName, true))== 0)
|
||||
if ((triggerAction == null ? 0 : triggerAction.Invoke(ds.triggerName, false))== 0)
|
||||
{
|
||||
CutOpen(ds);
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ public class D_Process : I_Enter, I_Exit
|
|||
CurrentSubProcess.Exit();
|
||||
CurrentSubProcess = GetSubProcess(subProcessId);
|
||||
CurrentSubProcess.Enter();
|
||||
UnityEngine.Debug.Log("切换子流程到:" + subProcessId);
|
||||
//UnityEngine.Debug.Log("切换子流程到:" + subProcessId);
|
||||
if (subProcessStepId == 0)
|
||||
CurrentSubProcess.HandoverSubProcessStep(CurrentSubProcess.subProcessStepes[0].id);
|
||||
else
|
||||
|
@ -127,7 +127,7 @@ public class D_Process : I_Enter, I_Exit
|
|||
/// </summary>
|
||||
public void Enter()
|
||||
{
|
||||
UnityEngine.Debug.Log("进入当前流程:" + id + "_" + processName);
|
||||
//UnityEngine.Debug.Log("进入当前流程:" + id + "_" + processName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -135,6 +135,6 @@ public class D_Process : I_Enter, I_Exit
|
|||
/// </summary>
|
||||
public void Exit()
|
||||
{
|
||||
UnityEngine.Debug.Log("退出当前流程:" + id + "_" + processName);
|
||||
//UnityEngine.Debug.Log("退出当前流程:" + id + "_" + processName);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ public class D_Scheme
|
|||
CurrentProcess.Exit();
|
||||
CurrentProcess = GetProcess(processId);
|
||||
CurrentProcess.Enter();
|
||||
UnityEngine.Debug.Log("切换流程到:" + processId);
|
||||
//UnityEngine.Debug.Log("切换流程到:" + processId);
|
||||
if (subProcessId == 0)
|
||||
CurrentProcess.HandoverSubProcess(CurrentProcess.subProcesses[0].id, subProcessStepId);
|
||||
else
|
||||
|
|
|
@ -108,8 +108,8 @@ public class D_SubProcess : I_Enter, I_Exit
|
|||
CurrentSubProcessStep.Exit();
|
||||
CurrentSubProcessStep = GetSubProcessStep(stepId);
|
||||
CurrentSubProcessStep.Enter();
|
||||
UnityEngine.Debug.Log("切换子流程步骤到:" + stepId);
|
||||
UnityEngine.Debug.Log("切换子流程步骤TriggerID到:" + ProcessManager.Instance.subProcessStepTriggerID);
|
||||
//UnityEngine.Debug.Log("切换子流程步骤到:" + stepId);
|
||||
//UnityEngine.Debug.Log("切换子流程步骤TriggerID到:" + ProcessManager.Instance.subProcessStepTriggerID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -135,7 +135,7 @@ public class D_SubProcess : I_Enter, I_Exit
|
|||
/// </summary>
|
||||
public void Exit()
|
||||
{
|
||||
UnityEngine.Debug.Log("退出当前子流程:" + id + "_" + subProcessName);
|
||||
//UnityEngine.Debug.Log("退出当前子流程:" + id + "_" + subProcessName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -143,6 +143,6 @@ public class D_SubProcess : I_Enter, I_Exit
|
|||
/// </summary>
|
||||
public void Enter()
|
||||
{
|
||||
UnityEngine.Debug.Log("进入当前子流程:" + id + "_" + subProcessName);
|
||||
//UnityEngine.Debug.Log("进入当前子流程:" + id + "_" + subProcessName);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ public class D_SubProcessStep : I_Enter, I_Exit
|
|||
public void Enter()
|
||||
{
|
||||
//GetTriggerID();
|
||||
UnityEngine.Debug.Log("进入当前子流程步骤:" + id + "_" + subProcessStepName);
|
||||
//UnityEngine.Debug.Log("进入当前子流程步骤:" + id + "_" + subProcessStepName);
|
||||
}
|
||||
/// <summary>
|
||||
/// 退出
|
||||
|
@ -75,6 +75,6 @@ public class D_SubProcessStep : I_Enter, I_Exit
|
|||
{
|
||||
//triggersId.Clear();
|
||||
//triggersComplete.Clear();
|
||||
UnityEngine.Debug.Log("退出当前子流程步骤:" + id + "_" + subProcessStepName);
|
||||
//UnityEngine.Debug.Log("退出当前子流程步骤:" + id + "_" + subProcessStepName);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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($"<color=red>进入下一步子流程</color>");
|
||||
//Debug.Log("进入下一步子流程");
|
||||
return true;
|
||||
}
|
||||
|
@ -188,26 +188,28 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
if (triggerID == currentSubProcessStepTriggerID)
|
||||
{
|
||||
if (isRemove)
|
||||
{
|
||||
d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.triggersName.RemoveAt(0);
|
||||
}
|
||||
if (d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.triggersName.Count == 0)
|
||||
{
|
||||
CheckSubProcessSteps(subProcessStepId);
|
||||
}
|
||||
if (d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.triggersName.Count != 0)
|
||||
{
|
||||
string triggerNameTemp = d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.triggersName[0];
|
||||
string splitResult = "";
|
||||
if (triggerNameTemp.Contains("+"))
|
||||
if (triggerID != "工具间按钮" && triggerID != "现场按钮" && triggerID != "收回工具")
|
||||
{
|
||||
splitResult = triggerNameTemp.Split('+')[1];
|
||||
GameManager.UIMgr.ShowPanel<UI_MessagePanel>(E_UI_Layer.System, (p) =>
|
||||
{
|
||||
p.Init("提示", "当前步骤已完成,即将进入下一步", E_MessageType.Normal, () =>
|
||||
{
|
||||
CheckSubProcessSteps(subProcessStepId);
|
||||
CurrentSubProcessStepTriggerNames();
|
||||
});
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
splitResult = triggerNameTemp;
|
||||
CheckSubProcessSteps(subProcessStepId);
|
||||
}
|
||||
subProcessStepTriggerID = splitResult;
|
||||
GameManager.EventMgr.EventTrigger<string>(Enum_EventType.SwitchSubProcessStepTriggerID, splitResult);
|
||||
}
|
||||
CurrentSubProcessStepTriggerNames();
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
|
@ -229,6 +231,31 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 切换流程之后, 当前子流程步骤triggerName不等于0的时候操作
|
||||
/// </summary>
|
||||
private void CurrentSubProcessStepTriggerNames()
|
||||
{
|
||||
if (d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.triggersName.Count != 0)
|
||||
{
|
||||
string triggerNameTemp = d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.triggersName[0];
|
||||
string splitResult = "";
|
||||
if (triggerNameTemp.Contains("+"))
|
||||
{
|
||||
splitResult = triggerNameTemp.Split('+')[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
splitResult = triggerNameTemp;
|
||||
}
|
||||
subProcessStepTriggerID = splitResult;
|
||||
GameManager.EventMgr.EventTrigger<string>(Enum_EventType.SwitchSubProcessStepTriggerID, splitResult);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 操作错子流程步骤的triggerName的错误提示
|
||||
/// </summary>
|
||||
private void StepErrorTips()
|
||||
{
|
||||
if (GameManager.UIMgr.GetPanel<UI_MiddleTipPanel>())
|
||||
|
|
|
@ -31,7 +31,6 @@ public class ImageTips : MonoBehaviour
|
|||
{
|
||||
if (tween != null)
|
||||
tween.Kill(true);
|
||||
//image.DOKill();
|
||||
transform.parent = null;
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
|
|
@ -34,15 +34,16 @@ public class MobileController : PermanentTriggerBase
|
|||
}
|
||||
}
|
||||
|
||||
private void PlayerTalk(string triggerID)
|
||||
private void PlayerTalk(string triggerName)
|
||||
{
|
||||
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerID, true) == 0)
|
||||
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, false) == 0)
|
||||
{
|
||||
GameManager.UIMgr.ShowPanel<UI_CustomSessionPanel>(E_UI_Layer.Mid, (panel) =>
|
||||
{
|
||||
panel.Init(triggerID, "ºÃµÄ", (intTemp) =>
|
||||
panel.Init(triggerName, "ºÃµÄ", (intTemp) =>
|
||||
{
|
||||
ScoreManager.instance.Check(triggerName, "工作预约完成");
|
||||
GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, true);
|
||||
GameManager.UIMgr.HidePanel<UI_CustomSessionPanel>();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -45,7 +45,10 @@ public class UI_CheckMyselfPanel : BasePanel
|
|||
private void OnWearState()
|
||||
{
|
||||
if (PacksackBagMgr.Instance.IsWeared(validToolNames))
|
||||
{
|
||||
GameManager.UIMgr.imageTips.HideTips();
|
||||
GameManager.UIMgr.HidePanel<UI_CheckMyselfPanel>();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnClick(string btnName)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
@ -43,24 +41,24 @@ public class UI_MessagePanel : BasePanel
|
|||
{
|
||||
case E_MessageType.Normal:
|
||||
GetControl<Image>("Image_NormalBackGround").gameObject.SetActive(true);
|
||||
GetControl<Image>("Image_WarnBackGround").gameObject.SetActive(false);
|
||||
GetControl<Button>("Button_NormalConfirm").gameObject.SetActive(true);
|
||||
GetControl<Image>("Image_WarnBackGround").gameObject.SetActive(false);
|
||||
GetControl<Button>("Button_NormalCancel").gameObject.SetActive(false);
|
||||
GetControl<Button>("Button_WarmConfirm").gameObject.SetActive(false);
|
||||
break;
|
||||
case E_MessageType.Error:
|
||||
GetControl<Image>("Image_NormalBackGround").gameObject.SetActive(true);
|
||||
GetControl<Image>("Image_WarnBackGround").gameObject.SetActive(false);
|
||||
GetControl<Button>("Button_NormalConfirm").gameObject.SetActive(true);
|
||||
GetControl<Button>("Button_NormalCancel").gameObject.SetActive(true);
|
||||
GetControl<Image>("Image_WarnBackGround").gameObject.SetActive(false);
|
||||
GetControl<Button>("Button_WarmConfirm").gameObject.SetActive(false);
|
||||
break;
|
||||
case E_MessageType.Warning:
|
||||
GetControl<Image>("Image_WarnBackGround").gameObject.SetActive(true);
|
||||
GetControl<Button>("Button_WarmConfirm").gameObject.SetActive(true);
|
||||
GetControl<Image>("Image_NormalBackGround").gameObject.SetActive(false);
|
||||
GetControl<Button>("Button_NormalConfirm").gameObject.SetActive(false);
|
||||
GetControl<Button>("Button_NormalCancel").gameObject.SetActive(false);
|
||||
GetControl<Button>("Button_WarmConfirm").gameObject.SetActive(true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue