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