修改垃圾触发逻辑

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} objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 179a5688a95dfd44788db3e0947c79b0, type: 3} - target: {fileID: 919132149155446097, guid: 179a5688a95dfd44788db3e0947c79b0, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 0 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 179a5688a95dfd44788db3e0947c79b0, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 179a5688a95dfd44788db3e0947c79b0, type: 3}

View File

@ -51,6 +51,7 @@ public class Device_MeasuringCabinet : MonoBehaviour
{ {
AddActions(); AddActions();
GameManager.EventMgr.AddEventListener<string>(Enum_EventType.SwitchSubProcessStepTriggerID, SwitchSubProcessStepTriggerID); GameManager.EventMgr.AddEventListener<string>(Enum_EventType.SwitchSubProcessStepTriggerID, SwitchSubProcessStepTriggerID);
sundries.gameObject.SetActive(false);
} }
/// <summary> /// <summary>
/// Ìí¼Ó¸÷ÖÖ²Ù×÷»Øµ÷ /// Ìí¼Ó¸÷ÖÖ²Ù×÷»Øµ÷

View File

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

View File

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