Merge branch 'main' of http://172.16.1.12/WangWeiZhi/YanCheng_Metrology
This commit is contained in:
commit
addab0d363
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c80ccdb516dbab94083bd57fa1650eda
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -19,6 +19,7 @@ public class Device_Base : PermanentTriggerBase
|
||||||
if ( GameManager.RunModelMgr.SceneType == E_SceneType.Site)
|
if ( GameManager.RunModelMgr.SceneType == E_SceneType.Site)
|
||||||
{
|
{
|
||||||
base.OnStart();
|
base.OnStart();
|
||||||
|
AddTriggerAction(GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class Device_Cover : Device_Base
|
||||||
|
|
||||||
private void OnMouseDown()
|
private void OnMouseDown()
|
||||||
{
|
{
|
||||||
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, true) == 0)
|
if ((triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true)) == 0)
|
||||||
{
|
{
|
||||||
Debug.Log("½ÓÏßÍêºÃ");
|
Debug.Log("½ÓÏßÍêºÃ");
|
||||||
isCheckOK = true;
|
isCheckOK = true;
|
||||||
|
@ -59,7 +59,7 @@ public class Device_Cover : Device_Base
|
||||||
transform.DOLocalMoveY(-0.1388763f, 2);
|
transform.DOLocalMoveY(-0.1388763f, 2);
|
||||||
transform.DOLocalMoveZ(-0.2485413f, 2).OnComplete(() =>
|
transform.DOLocalMoveZ(-0.2485413f, 2).OnComplete(() =>
|
||||||
{
|
{
|
||||||
GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, true);
|
int result=(triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class Device_Switch : Device_Base
|
||||||
if(isOpen)
|
if(isOpen)
|
||||||
{
|
{
|
||||||
isOpen = false;
|
isOpen = false;
|
||||||
transform.localEulerAngles = new Vector3(45, 0, 0);
|
transform.localEulerAngles = new Vector3(0, 45, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class Device_CabinetDoor : Device_Base
|
||||||
if (LiveSceneManager.Instance.currentTool != null && LiveSceneManager.Instance.currentTool.name == "Ñéµç±Ê")
|
if (LiveSceneManager.Instance.currentTool != null && LiveSceneManager.Instance.currentTool.name == "Ñéµç±Ê")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, true) == 0)
|
if ((triggerAction==null?0: triggerAction.Invoke(triggerName, true)) == 0)
|
||||||
{
|
{
|
||||||
base.OnMDown();
|
base.OnMDown();
|
||||||
if (isOpen)
|
if (isOpen)
|
||||||
|
|
|
@ -37,6 +37,10 @@ public class Device_MeasuringCabinet : Device_Base
|
||||||
/// 电能表安装完成后的杂物
|
/// 电能表安装完成后的杂物
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Device_Sundries sundries;
|
public Device_Sundries sundries;
|
||||||
|
/// <summary>
|
||||||
|
/// 进电开关接线螺丝
|
||||||
|
/// </summary>
|
||||||
|
public List<Tool_Screw> inSwitchScrews;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
@ -142,6 +146,11 @@ public class Device_MeasuringCabinet : Device_Base
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//进电开关螺丝是否带电
|
||||||
|
inSwitchScrews.ForEach(a =>
|
||||||
|
{
|
||||||
|
a.hasElectricity = inSwitch.isOpen;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
|
|
@ -23,6 +23,7 @@ public class Tool_Base : PermanentTriggerBase
|
||||||
if ( GameManager.RunModelMgr.SceneType == E_SceneType.Site)
|
if ( GameManager.RunModelMgr.SceneType == E_SceneType.Site)
|
||||||
{
|
{
|
||||||
base.OnStart();
|
base.OnStart();
|
||||||
|
AddTriggerAction(GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected override void OnMEnter()
|
protected override void OnMEnter()
|
||||||
|
|
|
@ -55,7 +55,8 @@ public class Tool_Screwdriver : Tool_Base
|
||||||
Debug.Log("·âӡδ¼ô¶Ï");
|
Debug.Log("·âӡδ¼ô¶Ï");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(ts.triggerName, true) == 0)
|
|
||||||
|
if ((triggerAction == null ? 0 : triggerAction.Invoke(ts.triggerName, true)) == 0)
|
||||||
{
|
{
|
||||||
if (ts.isInstall)
|
if (ts.isInstall)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Unity.VisualScripting;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -16,34 +17,35 @@ public class Tool_TestPen : Tool_Base
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (GameManager.RunModelMgr.SceneType != E_SceneType.Site) return;
|
if (GameManager.RunModelMgr!=null && GameManager.RunModelMgr.SceneType != E_SceneType.Site)
|
||||||
if (LiveSceneManager.Instance.currentTool != null && LiveSceneManager.Instance.currentTool.name == "验电笔")
|
return;
|
||||||
{
|
|
||||||
if (Input.GetMouseButtonDown(0))
|
|
||||||
{
|
|
||||||
//点击螺丝验电
|
|
||||||
Ray tmpray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
|
||||||
if (Physics.Raycast(tmpray, out RaycastHit hit))
|
|
||||||
{
|
|
||||||
//插座/柜门
|
|
||||||
Device_Base db = hit.transform.GetComponent<Device_Base>();
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
Test(db);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//螺丝
|
|
||||||
Tool_Base tb = hit.transform.GetComponent<Tool_Base>();
|
if (Input.GetMouseButtonDown(0))
|
||||||
if (tb != null)
|
{
|
||||||
{
|
//点击螺丝验电
|
||||||
Test(tb);
|
Ray tmpray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||||
return;
|
if (Physics.Raycast(tmpray, out RaycastHit hit))
|
||||||
}
|
{
|
||||||
|
//插座/柜门
|
||||||
|
Device_Base db = hit.transform.GetComponent<Device_Base>();
|
||||||
|
if (db != null)
|
||||||
|
{
|
||||||
|
Test(db);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//螺丝
|
||||||
|
Tool_Base tb = hit.transform.GetComponent<Tool_Base>();
|
||||||
|
if (tb != null)
|
||||||
|
{
|
||||||
|
Test(tb);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (isFlicker)
|
if (isFlicker)
|
||||||
{
|
{
|
||||||
time += Time.deltaTime * 3;
|
time += Time.deltaTime * 3;
|
||||||
|
@ -67,7 +69,7 @@ public class Tool_TestPen : Tool_Base
|
||||||
/// <param name="device_base">被验电设备</param>
|
/// <param name="device_base">被验电设备</param>
|
||||||
public void Test(Device_Base device_base)
|
public void Test(Device_Base device_base)
|
||||||
{
|
{
|
||||||
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(device_base.triggerName, true) == 0)
|
if ((triggerAction == null ? 0 : triggerAction.Invoke(triggerName + device_base.triggerName, true)) == 0)
|
||||||
{
|
{
|
||||||
if (device_base.deviceType == DeviceType.计量柜_插座)
|
if (device_base.deviceType == DeviceType.计量柜_插座)
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class Tool_WireStripper : Tool_Base
|
||||||
Device_Seal ds = hit.transform.GetComponent<Device_Seal>();
|
Device_Seal ds = hit.transform.GetComponent<Device_Seal>();
|
||||||
if (ds != null)
|
if (ds != null)
|
||||||
{
|
{
|
||||||
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(ds.triggerName, true) == 0)
|
if ((triggerAction == null ? 0 : triggerAction.Invoke(ds.triggerName, true)) == 0)
|
||||||
{
|
{
|
||||||
CutOpen(ds);
|
CutOpen(ds);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue