This commit is contained in:
YangHua 2024-08-21 15:35:39 +08:00
commit 099f3601f9
9 changed files with 5296 additions and 84 deletions

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,8 @@ public class Device_Cover : Device_Base
{ {
Debug.Log("打开盖子"); Debug.Log("打开盖子");
isOpen = true; isOpen = true;
transform.DOLocalMoveZ(transform.localPosition.z - 0.15f, 2); transform.DOLocalMoveY(transform.localPosition.y - 0.15f, 2);
transform.DOLocalMoveZ(transform.localPosition.y - 0.15f, 2);
} }
/// <summary> /// <summary>
@ -54,6 +55,7 @@ public class Device_Cover : Device_Base
{ {
Debug.Log("盖上盖子"); Debug.Log("盖上盖子");
isOpen = false; isOpen = false;
transform.DOLocalMoveY(transform.localPosition.y + 0.15f, 2);
transform.DOLocalMoveZ(transform.localPosition.z + 0.15f, 2); transform.DOLocalMoveZ(transform.localPosition.z + 0.15f, 2);
} }
} }

View File

@ -27,14 +27,13 @@ public class Device_DirectAccessElectricEnergyMeteringDevice : Device_Base
[Tooltip("右盖子封印")] [Tooltip("右盖子封印")]
public Device_Seal cover_seal_Right; public Device_Seal cover_seal_Right;
/// <summary>
/// 电能表接线螺丝
/// </summary>
public List<Tool_Screw> line_screws;
/// <summary> /// <summary>
/// 电能表接线 /// 电能表接线
/// </summary> /// </summary>
public List<Tool_Line> lines; [Tooltip("½ÓÏß")]
public List<Tool_Line> jieXian_lines;
/// <summary> /// <summary>
/// 电能表固定螺丝 /// 电能表固定螺丝
/// </summary> /// </summary>

View File

@ -23,8 +23,4 @@ public class Device_MeasuringCabinet : Device_Base
/// 进电开关 /// 进电开关
/// </summary> /// </summary>
public Device_Switch inSwitch; public Device_Switch inSwitch;
/// <summary>
/// ·âÓ¡
/// </summary>
public Device_Seal seal;
} }

View File

@ -15,6 +15,7 @@ public class Tool_Base : PermanentTriggerBase
protected override void OnMEnter() protected override void OnMEnter()
{ {
base.OnMEnter(); base.OnMEnter();
Debug.Log(gameObject.name);
_highlight.highlighted = true; _highlight.highlighted = true;
} }
protected override void OnMExit() protected override void OnMExit()

View File

@ -1,3 +1,4 @@
using DG.Tweening;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -8,8 +9,47 @@ using UnityEngine;
/// </summary> /// </summary>
public class Tool_Line: Tool_Base public class Tool_Line: Tool_Base
{ {
/// <summary>
/// 是否接上
/// </summary>
public bool isConnected;
/// <summary> /// <summary>
/// ±êʶ /// ±êʶ
/// </summary> /// </summary>
public string id; public string id;
/// <summary>
/// 固定接线的螺丝
/// </summary>
public List<Tool_Screw> screws=new List<Tool_Screw>();
protected override void OnAwake()
{
base.OnAwake();
id = gameObject.name;
}
private void OnMouseDown()
{
if(isConnected)
{
//取下接线
if(screws.TrueForAll(a=>!a.isInstall))
{
isConnected = false;
transform.DOLocalMoveY(transform.localPosition.y - 2, 1);
}
}
else
{
//装上接线
if (screws.TrueForAll(a => !a.isInstall))
{
transform.DOLocalMoveY(transform.localPosition.y + 2, 1).OnComplete(() =>
{
isConnected = true;
});
}
}
}
} }

View File

@ -36,8 +36,9 @@ public class Tool_Screw : Tool_Base
private float localYUnInstallValue; private float localYUnInstallValue;
private void Awake() protected override void OnAwake()
{ {
base.OnAwake();
id = gameObject.name; id = gameObject.name;
} }

View File

@ -185,7 +185,8 @@ public enum ToolType
, ,
, ,
, ,
,
线
} }
/// <summary> /// <summary>

View File

@ -11,7 +11,7 @@ public class PermanentTriggerBase : MonoBehaviour
{ {
public int triggerID; public int triggerID;
public string triggerName; public string triggerName;
[HideInInspector] //[HideInInspector]
public HighlightEffect _highlight; public HighlightEffect _highlight;
private void Awake() private void Awake()
{ {