This commit is contained in:
parent
8f07996c68
commit
8381ccb607
|
@ -47,8 +47,8 @@ BoxCollider:
|
||||||
m_IsTrigger: 0
|
m_IsTrigger: 0
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Size: {x: 0.18160681, y: 0.021532074, z: 0.20436215}
|
m_Size: {x: 0.06433654, y: 0.021532074, z: 0.20436215}
|
||||||
m_Center: {x: 0.04080341, y: -0.00039234012, z: 0.100046635}
|
m_Center: {x: 0.00028002262, y: -0.00039234012, z: 0.100046635}
|
||||||
--- !u!114 &2557768358979172441
|
--- !u!114 &2557768358979172441
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -253,6 +253,9 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: ed5f63fb6d7e2264f9d874f16a129f33, type: 3}
|
m_Script: {fileID: 11500000, guid: ed5f63fb6d7e2264f9d874f16a129f33, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
triggerID: 0
|
||||||
|
triggerName:
|
||||||
|
_highlight: {fileID: 0}
|
||||||
toolType: 1
|
toolType: 1
|
||||||
--- !u!1001 &2557768359515585564
|
--- !u!1001 &2557768359515585564
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -185,7 +185,8 @@ public enum ToolType
|
||||||
工作证,
|
工作证,
|
||||||
盒装封印,
|
盒装封印,
|
||||||
绝缘胶带,
|
绝缘胶带,
|
||||||
螺丝
|
螺丝,
|
||||||
|
接线
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -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()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue