改动修复
This commit is contained in:
parent
e66378f5f0
commit
57b484c906
|
@ -6229,7 +6229,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 6589deeaefa4a17428d6c3ce0d699c77, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
device_Control: {fileID: 0}
|
||||
device_Control: {fileID: 1723332379}
|
||||
--- !u!114 &1577392988 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5948617165317844720, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3}
|
||||
|
@ -6493,7 +6493,7 @@ MonoBehaviour:
|
|||
- {fileID: 302277748}
|
||||
- {fileID: 302277752}
|
||||
- {fileID: 1352022184}
|
||||
dianCollider: {fileID: 478648694}
|
||||
dianTrigger: {fileID: 0}
|
||||
sundries: {fileID: 737359439}
|
||||
inSwitchScrews:
|
||||
- {fileID: 1775693151}
|
||||
|
|
|
@ -5469,7 +5469,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 6589deeaefa4a17428d6c3ce0d699c77, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
device_Control: {fileID: 0}
|
||||
device_Control: {fileID: 1723332379}
|
||||
--- !u!114 &1577392988 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5948617165317844720, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3}
|
||||
|
|
|
@ -2,6 +2,7 @@ using DG.Tweening;
|
|||
using Sirenix.Utilities;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
|
@ -202,6 +203,7 @@ public class Device_3Phase4WireMeter : Device_Base
|
|||
{
|
||||
transform.parent = device_MeasuringCabinet.transform;
|
||||
device_MeasuringCabinet.meteringDevice = this;
|
||||
transform.GetComponentsInChildren<PermanentTriggerBase>(true).ToList().ForEach(a => a.Awake());
|
||||
//默认是拆除的状态
|
||||
Init(false);
|
||||
hand_out_action?.Invoke();
|
||||
|
|
|
@ -134,12 +134,14 @@ public class Device_Cover : Device_Base
|
|||
if (obj == null)
|
||||
{
|
||||
//收回
|
||||
cover_seal_left_Trigger.gameObject.SetActive(false);
|
||||
Debug.Log("收回");
|
||||
cover_seal_left_Trigger.gameObject.SetActive(false);
|
||||
cover_seal_right_Trigger.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
//拿出
|
||||
Debug.Log("拿出");
|
||||
if (obj.name == "盒装封印")
|
||||
{
|
||||
if (!isOpen && cover_seal_Left.isCut && cover_screw_Left.isInstall)
|
||||
|
@ -200,13 +202,4 @@ public class Device_Cover : Device_Base
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventCenter.Instance.RemoveEventListener<GameObject>(Enum_EventType.TakeOutAndRetrievingTheTools, CheckTriggerShow);
|
||||
}
|
||||
private void OnDisable()
|
||||
{
|
||||
EventCenter.Instance.RemoveEventListener<GameObject>(Enum_EventType.TakeOutAndRetrievingTheTools, CheckTriggerShow);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,12 +49,13 @@ public class Device_Control_1002 : Device_Control
|
|||
|
||||
private void Awake()
|
||||
{
|
||||
//设置控制脚本
|
||||
StepStateControl.instance.SetDeviceControl(1002,this);
|
||||
AddActions();
|
||||
//if (GameManager.RunModelMgr.ModeType == E_ModeType.Study)
|
||||
// GameManager.EventMgr.AddEventListener<string>(Enum_EventType.SwitchSubProcessStepTriggerID, SwitchSubProcessStepTriggerID);
|
||||
sundries.gameObject.SetActive(false);
|
||||
ScoreManager.instance.SetDeviceControl(1002,this);
|
||||
|
||||
AddActions();
|
||||
|
||||
sundries.gameObject.SetActive(false);
|
||||
check_JieXian.tool_Lines = jieXian_lines;
|
||||
check_JieXian.tool_Screws = meteringDevice.jieXian_screws;
|
||||
|
||||
|
@ -131,17 +132,7 @@ public class Device_Control_1002 : Device_Control
|
|||
});
|
||||
});
|
||||
}
|
||||
//private void SwitchSubProcessStepTriggerID(string arg0)
|
||||
//{
|
||||
// if (dianTrigger.triggerName == arg0)
|
||||
// {
|
||||
// dianTrigger.GetComponent<HighlightEffect>().SetHighlighted(true);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// dianTrigger.GetComponent<HighlightEffect>().SetHighlighted(false);
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// »¹Ô¼ÆÁ¿¹ñ״̬
|
||||
/// </summary>
|
||||
|
@ -286,15 +277,4 @@ public class Device_Control_1002 : Device_Control
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//private void OnDestroy()
|
||||
//{
|
||||
// if (GameManager.RunModelMgr.ModeType == E_ModeType.Study)
|
||||
// GameManager.EventMgr.RemoveEventListener<string>(Enum_EventType.SwitchSubProcessStepTriggerID, SwitchSubProcessStepTriggerID);
|
||||
//}
|
||||
//private void OnDisable()
|
||||
//{
|
||||
// if (GameManager.RunModelMgr.ModeType == E_ModeType.Study)
|
||||
// GameManager.EventMgr.RemoveEventListener<string>(Enum_EventType.SwitchSubProcessStepTriggerID, SwitchSubProcessStepTriggerID);
|
||||
//}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,16 @@ public class ScoreManager : MonoBehaviour
|
|||
a.Init();
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置控制脚本
|
||||
/// </summary>
|
||||
/// <param name="subejctid"></param>
|
||||
/// <param name="control"></param>
|
||||
public void SetDeviceControl(int subejctid, Device_Control control)
|
||||
{
|
||||
scoreSubjectList.Find(a => a.schemeId == subejctid).SetDeviceControl(control);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检测分数
|
||||
/// </summary>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using Cysharp.Threading.Tasks.Triggers;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
|
@ -17,5 +18,7 @@ public class SiteManager : MonoBehaviour
|
|||
private void Awake()
|
||||
{
|
||||
instance = this;
|
||||
//基类全部初始化
|
||||
device_Control.transform.GetComponentsInChildren<PermanentTriggerBase>(true).ToList().ForEach(a=>a.Awake());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ using UnityEngine;
|
|||
using HighlightPlus;
|
||||
using UnityEngine.EventSystems;
|
||||
using System;
|
||||
using Unity.VisualScripting;
|
||||
|
||||
/// <summary>
|
||||
/// 常驻交互
|
||||
|
@ -26,11 +27,20 @@ public class PermanentTriggerBase : MonoBehaviour
|
|||
/// 收回手里的回调
|
||||
/// </summary>
|
||||
protected Action hand_back_action;
|
||||
/// <summary>
|
||||
/// 是否初始化了
|
||||
/// </summary>
|
||||
private bool isInit;
|
||||
|
||||
private void Awake()
|
||||
public void Awake()
|
||||
{
|
||||
OnAwake();
|
||||
AddScoreAction(ScoreManager.instance.Check);
|
||||
if (!isInit)
|
||||
{
|
||||
isInit = true;
|
||||
OnAwake();
|
||||
AddScoreAction(ScoreManager.instance.Check);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
|
|
Loading…
Reference in New Issue