修改垃圾触发逻辑

This commit is contained in:
YangHua 2024-08-30 14:52:04 +08:00
parent 55c6275293
commit 3ca2d5ecb8
5 changed files with 14 additions and 12 deletions

File diff suppressed because one or more lines are too long

View File

@ -1985,7 +1985,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 179a5688a95dfd44788db3e0947c79b0, type: 3}
propertyPath: m_IsActive
value: 0
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 179a5688a95dfd44788db3e0947c79b0, type: 3}

View File

@ -51,6 +51,7 @@ public class Device_MeasuringCabinet : MonoBehaviour
{
AddActions();
GameManager.EventMgr.AddEventListener<string>(Enum_EventType.SwitchSubProcessStepTriggerID, SwitchSubProcessStepTriggerID);
sundries.gameObject.SetActive(false);
}
/// <summary>
/// 添加各种操作回调
@ -184,7 +185,7 @@ public class Device_MeasuringCabinet : MonoBehaviour
{
//安装了则
//零线无电流,有电压
if(b.triggerName.Contains("Áã"))
if (b.triggerName.Contains("Áã"))
{
b.hasElectricity = false;
}
@ -212,7 +213,7 @@ public class Device_MeasuringCabinet : MonoBehaviour
{
//显示接线完好物体
SiteManager.instance.measuringCabinet.check_JieXian.isChecked = false;
SiteManager.instance.measuringCabinet.check_JieXian.GetComponent<BoxCollider>().enabled=true;
SiteManager.instance.measuringCabinet.check_JieXian.GetComponent<BoxCollider>().enabled = true;
Debug.Log("显示接线");
}
else

View File

@ -6,12 +6,12 @@ public class Device_Sundries : Device_Base
{
protected override void OnMDown()
{
base.OnMDown();
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, true) == 0)
if ((triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true)) == 0)
{
base.OnMDown();
Debug.Log("清理柜子杂物");
gameObject.SetActive(false);
triggerAction.Invoke(triggerName, false);
//triggerAction.Invoke(triggerName, false);
base.CallScoreAction();
}

View File

@ -88,9 +88,10 @@ public class LiveSceneManager : SingletonMono<LiveSceneManager>
}
}
public void OnCheckSubProcess(bool ifdestroy=true)
public void OnCheckSubProcess(bool ifdestroy = true)
{
tMDTips.gameObject.SetActive(false);
if (tMDTips != null)
tMDTips.gameObject.SetActive(false);
if (ifdestroy)
Destroy(currentTool);
}