Compare commits
No commits in common. "52acbe5f40beb3f5633d884fa2cede0d34b75fa7" and "4db5e8dd7c30f15ef888491e1dfcb8cafd3ad927" have entirely different histories.
52acbe5f40
...
4db5e8dd7c
|
|
@ -123,8 +123,8 @@ CapsuleCollider:
|
|||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
m_Radius: 0.2
|
||||
m_Height: 1.7
|
||||
m_Radius: 0.5
|
||||
m_Height: 2
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &7005868485670428847
|
||||
|
|
|
|||
|
|
@ -1168,7 +1168,7 @@ GameObject:
|
|||
- component: {fileID: 4658103605771657434}
|
||||
- component: {fileID: 2797656432174285614}
|
||||
m_Layer: 0
|
||||
m_Name: "\u4E09\u76F8\u56DB\u7EBF\u7535\u80FD\u8868_xxx"
|
||||
m_Name: "\u4E09\u76F8\u56DB\u7EBF\u7535\u80FD\u8868"
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b89569af6fe931647be081fff26b1b94
|
||||
guid: 0ea8c75644dbff14bacec41ed2dc6efc
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,6 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 10f4454f32eb20e4298912d896f6020e
|
||||
PrefabImporter:
|
||||
guid: a39ba73cc2686bf42b78647875bb8a23
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
|
@ -53,8 +53,8 @@ public class Device_Cover : Device_Base
|
|||
{
|
||||
Debug.Log("打开盖子");
|
||||
isOpen = true;
|
||||
transform.DOLocalMoveY(-0.1388763f, 2);
|
||||
transform.DOLocalMoveZ(-0.2485413f, 2);
|
||||
transform.DOLocalMoveY(transform.localPosition.y - 0.15f, 2);
|
||||
transform.DOLocalMoveZ(transform.localPosition.z - 0.15f, 2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -64,7 +64,7 @@ public class Device_Cover : Device_Base
|
|||
{
|
||||
Debug.Log("盖上盖子");
|
||||
isOpen = false;
|
||||
transform.DOLocalMoveY(0.01112366f, 2);
|
||||
transform.DOLocalMoveZ(-0.09854126f, 2);
|
||||
transform.DOLocalMoveY(transform.localPosition.y + 0.15f, 2);
|
||||
transform.DOLocalMoveZ(transform.localPosition.z + 0.15f, 2);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
using DG.Tweening;
|
||||
using Sirenix.Utilities;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -9,6 +9,11 @@ using UnityEngine;
|
|||
/// </summary>
|
||||
public class Device_DirectAccessElectricEnergyMeteringDevice : Device_Base
|
||||
{
|
||||
public static Device_DirectAccessElectricEnergyMeteringDevice instance;
|
||||
/// <summary>
|
||||
/// 是否已被拆除
|
||||
/// </summary>
|
||||
public bool isRemove;
|
||||
/// <summary>
|
||||
/// 铭牌
|
||||
/// </summary>
|
||||
|
|
@ -19,6 +24,13 @@ public class Device_DirectAccessElectricEnergyMeteringDevice : Device_Base
|
|||
/// </summary>
|
||||
public Device_Cover cover;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 电能表接线
|
||||
/// </summary>
|
||||
[Tooltip("接线")]
|
||||
public List<Tool_Line> jieXian_lines;
|
||||
|
||||
/// <summary>
|
||||
/// 电能表固定螺丝左
|
||||
/// </summary>
|
||||
|
|
@ -27,61 +39,14 @@ public class Device_DirectAccessElectricEnergyMeteringDevice : Device_Base
|
|||
/// 电能表固定螺丝右
|
||||
/// </summary>
|
||||
public Tool_Screw fix_screw_right;
|
||||
/// <summary>
|
||||
/// 电能表接线螺丝
|
||||
/// </summary>
|
||||
public List<Tool_Screw> jieXian_screws;
|
||||
|
||||
|
||||
private BoxCollider boxCollider;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
instance = this;
|
||||
boxCollider = GetComponent<BoxCollider>();
|
||||
if(UnityEngine.SceneManagement.SceneManager.GetActiveScene().name== "05_LiveScene")
|
||||
{
|
||||
boxCollider.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 初始化电能表状态(默认是装好的状态不用设置)
|
||||
/// </summary>
|
||||
/// <param name="isIntsalledState"></param>
|
||||
public void Init(bool isIntsalledState)
|
||||
{
|
||||
if(!isIntsalledState)
|
||||
{
|
||||
Debug.Log("电能表设置为拆下状态");
|
||||
//盖子拆除
|
||||
cover.isOpen = true;
|
||||
cover.transform.localPosition = new Vector3(0.0001220703f, -0.1388763f, -0.2485413f);
|
||||
//左螺丝拧下
|
||||
cover.cover_screw_Left.isInstall = false;
|
||||
cover.cover_screw_Left.transform.localPosition = new Vector3(0.06128693f, -0.03405334f, -0.1012321f);
|
||||
//右螺丝拧下
|
||||
cover.cover_screw_Right.isInstall = false;
|
||||
cover.cover_screw_Right.transform.localPosition = new Vector3(-0.06129074f, -0.03405334f, -0.1012321f);
|
||||
//左封印被剪开
|
||||
cover.cover_seal_Left.isCut = true;
|
||||
cover.cover_seal_Left.gameObject.SetActive(false);
|
||||
//右封印被剪开
|
||||
cover.cover_seal_Right.isCut = true;
|
||||
cover.cover_seal_Right.gameObject.SetActive(false);
|
||||
//左固定螺丝拧下
|
||||
fix_screw_left.isInstall = false;
|
||||
fix_screw_left.transform.localPosition = new Vector3(0.06592941f, 0.03107117f, -0.1094047f);
|
||||
//右固定螺丝拧下
|
||||
fix_screw_right.isInstall = false;
|
||||
fix_screw_right.transform.localPosition = new Vector3(-0.06737137f, 0.03107117f, -0.1094047f);
|
||||
//接线螺丝全部拧下
|
||||
jieXian_screws.ForEach(a =>
|
||||
{
|
||||
a.isInstall = false;
|
||||
a.transform.localPosition = new Vector3(a.transform.localPosition.x, 0.005695801f, a.transform.localPosition.z);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -89,15 +54,18 @@ public class Device_DirectAccessElectricEnergyMeteringDevice : Device_Base
|
|||
/// </summary>
|
||||
public void Remove()
|
||||
{
|
||||
//拆下电能表
|
||||
if (!fix_screw_left.isInstall && !fix_screw_right.isInstall)
|
||||
if (!isRemove)
|
||||
{
|
||||
SiteManager.instance.measuringCabinet.meteringDevice = null;
|
||||
Debug.Log("电能表已拆除");
|
||||
transform.DOLocalMove(transform.localPosition - new Vector3(0, 0.2f, 0.2f), 2).OnComplete(() =>
|
||||
//拆下电能表
|
||||
if (!fix_screw_left.isInstall && !fix_screw_right.isInstall)
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
});
|
||||
isRemove = true;
|
||||
Debug.Log("电能表已拆除");
|
||||
transform.DOLocalMove(transform.localPosition - new Vector3(0, 0.2f, 0.2f), 2).OnComplete(() =>
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -106,17 +74,16 @@ public class Device_DirectAccessElectricEnergyMeteringDevice : Device_Base
|
|||
/// </summary>
|
||||
public void Add()
|
||||
{
|
||||
transform.parent = SiteManager.instance.measuringCabinet.transform;
|
||||
//默认是拆除的状态
|
||||
Init(false);
|
||||
transform.DOLocalMove(new Vector3(0.1469002f, -0.1793365f, 0.5191498f), 2).OnStart(() =>
|
||||
if(isRemove)
|
||||
{
|
||||
transform.localEulerAngles = Vector3.zero;
|
||||
}).OnComplete(() =>
|
||||
{
|
||||
SiteManager.instance.measuringCabinet.meteringDevice = this;
|
||||
LiveSceneManager.Instance.currentTool = null;
|
||||
Debug.Log("电能表已安装");
|
||||
});
|
||||
gameObject.SetActive(true);
|
||||
transform.DOLocalMove(transform.localPosition + new Vector3(0, 0.2f, 0.2f), 2).OnComplete(() =>
|
||||
{
|
||||
isRemove = false;
|
||||
Debug.Log("电能表已安装");
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
|
@ -7,19 +6,6 @@ public class Device_Switch : Device_Base
|
|||
{
|
||||
public bool isOpen;
|
||||
|
||||
/// <summary>
|
||||
/// 操作开关事件
|
||||
/// </summary>
|
||||
private Action<bool> actionBack;
|
||||
|
||||
/// <summary>
|
||||
/// 添加开关操作回调
|
||||
/// </summary>
|
||||
/// <param name="actionBack"></param>
|
||||
public void AddAction(Action<bool> actionBack)
|
||||
{
|
||||
this.actionBack= actionBack;
|
||||
}
|
||||
|
||||
private void OnMouseDown()
|
||||
{
|
||||
|
|
@ -33,11 +19,5 @@ public class Device_Switch : Device_Base
|
|||
isOpen = true;
|
||||
transform.localEulerAngles = new Vector3(0, 0, 0);
|
||||
}
|
||||
|
||||
//调用自定义事件
|
||||
if (actionBack != null)
|
||||
{
|
||||
actionBack.Invoke(isOpen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using Unity.VisualScripting.Antlr3.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -10,7 +8,7 @@ using UnityEngine;
|
|||
public class Device_MeasuringCabinet : Device_Base
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前机柜中安装的三相四线电能表
|
||||
/// 直接接入式电能计量装置
|
||||
/// </summary>
|
||||
public Device_DirectAccessElectricEnergyMeteringDevice meteringDevice;
|
||||
/// <summary>
|
||||
|
|
@ -25,86 +23,4 @@ public class Device_MeasuringCabinet : Device_Base
|
|||
/// ½øµç¿ª¹Ø
|
||||
/// </summary>
|
||||
public Device_Switch inSwitch;
|
||||
/// <summary>
|
||||
/// 电能表接线
|
||||
/// </summary>
|
||||
public List<Tool_Line> jieXian_screws;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
//添加开关切换回调
|
||||
inSwitch.AddAction(isOpen =>
|
||||
{
|
||||
//刷新带电状态
|
||||
CheckHasElectricity();
|
||||
});
|
||||
|
||||
//添加螺丝拆装回调
|
||||
meteringDevice.jieXian_screws.ForEach(screw =>
|
||||
{
|
||||
screw.AddAction(isinstalled =>
|
||||
{
|
||||
//刷新带电状态
|
||||
CheckHasElectricity();
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 清空接线的螺丝参数
|
||||
/// </summary>
|
||||
public void ClearLineScrew()
|
||||
{
|
||||
Debug.Log("清除接线关联的螺丝");
|
||||
jieXian_screws.ForEach(a =>
|
||||
{
|
||||
a.screws.Clear();
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置接线的螺丝参数
|
||||
/// </summary>
|
||||
public void SetLineScrew()
|
||||
{
|
||||
Debug.Log("接线重新关联螺丝");
|
||||
jieXian_screws.ForEach(a =>
|
||||
{
|
||||
a.screws = meteringDevice.jieXian_screws.FindAll(b => b.gameObject.name.StartsWith(a.gameObject.name));
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 刷新电能表螺丝带电状态
|
||||
/// </summary>
|
||||
private void CheckHasElectricity()
|
||||
{
|
||||
Debug.Log("带电状态刷新");
|
||||
//进线螺丝是否带电
|
||||
jieXian_screws.ForEach(a =>
|
||||
{
|
||||
if (!inSwitch.isOpen)
|
||||
{
|
||||
//开关关闭不带电
|
||||
a.screws.ForEach(b => b.hasElectricity = false);
|
||||
}
|
||||
else
|
||||
{
|
||||
//开关打开--线接上--螺丝拧上带电
|
||||
if (!a.isConnected)
|
||||
{
|
||||
a.screws.ForEach(b => b.hasElectricity = false);
|
||||
}
|
||||
else
|
||||
{
|
||||
a.screws.ForEach(b =>
|
||||
{
|
||||
//安装了则带电
|
||||
b.hasElectricity = b.isInstall;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using Cysharp.Threading.Tasks.Triggers;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
|
@ -8,8 +7,6 @@ using UnityEngine;
|
|||
/// </summary>
|
||||
public class SiteManager : MonoBehaviour
|
||||
{
|
||||
|
||||
public static SiteManager instance;
|
||||
/// <summary>
|
||||
/// 机柜
|
||||
/// </summary>
|
||||
|
|
@ -18,28 +15,23 @@ public class SiteManager : MonoBehaviour
|
|||
/// 电能表碰撞
|
||||
/// </summary>
|
||||
public BoxCollider dianCollider;
|
||||
private void Awake()
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
//使能电能表碰撞
|
||||
if (measuringCabinet.meteringDevice == null)
|
||||
if (measuringCabinet.meteringDevice.isRemove)
|
||||
{
|
||||
dianCollider.enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//电能表固定螺丝拆掉了,线拆掉了
|
||||
if (!measuringCabinet.meteringDevice.fix_screw_left.isInstall && !measuringCabinet.meteringDevice.fix_screw_right.isInstall && measuringCabinet.jieXian_screws.TrueForAll(a=>!a.isConnected))
|
||||
if (!measuringCabinet.meteringDevice.fix_screw_left.isInstall && !measuringCabinet.meteringDevice.fix_screw_right.isInstall)
|
||||
{
|
||||
dianCollider.enabled = true;
|
||||
dianCollider.enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
dianCollider.enabled = false;
|
||||
dianCollider.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -49,23 +41,14 @@ public class SiteManager : MonoBehaviour
|
|||
{
|
||||
if(hit.collider== dianCollider)
|
||||
{
|
||||
if (measuringCabinet.meteringDevice==null)
|
||||
if (measuringCabinet.meteringDevice.isRemove)
|
||||
{
|
||||
//安装电能表
|
||||
if(LiveSceneManager.Instance.currentTool!=null && LiveSceneManager.Instance.currentTool.GetComponent<Device_DirectAccessElectricEnergyMeteringDevice>()!=null)
|
||||
{
|
||||
measuringCabinet.meteringDevice = LiveSceneManager.Instance.currentTool.GetComponent<Device_DirectAccessElectricEnergyMeteringDevice>();
|
||||
measuringCabinet.meteringDevice.Add();
|
||||
//接线关联螺丝
|
||||
measuringCabinet.SetLineScrew();
|
||||
}
|
||||
//²ðÏÂ
|
||||
measuringCabinet.meteringDevice.Remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
//拆下电能表
|
||||
measuringCabinet.meteringDevice.Remove();
|
||||
//情况接线关联螺丝
|
||||
measuringCabinet.ClearLineScrew();
|
||||
//°²×°
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,12 +23,6 @@ public class Tool_Line: Tool_Base
|
|||
/// </summary>
|
||||
public List<Tool_Screw> screws=new List<Tool_Screw>();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 安装状态时Y的local值
|
||||
/// </summary>
|
||||
public float InstallPosY;
|
||||
|
||||
protected override void OnAwake()
|
||||
{
|
||||
base.OnAwake();
|
||||
|
|
@ -42,10 +36,8 @@ public class Tool_Line: Tool_Base
|
|||
//取下接线
|
||||
if(screws.TrueForAll(a=>!a.isInstall))
|
||||
{
|
||||
transform.DOLocalMoveY(InstallPosY - 2, 1).OnComplete(()=>
|
||||
{
|
||||
isConnected = false;
|
||||
});
|
||||
isConnected = false;
|
||||
transform.DOLocalMoveY(transform.localPosition.y - 2, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -53,7 +45,7 @@ public class Tool_Line: Tool_Base
|
|||
//装上接线
|
||||
if (screws.TrueForAll(a => !a.isInstall))
|
||||
{
|
||||
transform.DOLocalMoveY(InstallPosY, 1).OnComplete(() =>
|
||||
transform.DOLocalMoveY(transform.localPosition.y + 2, 1).OnComplete(() =>
|
||||
{
|
||||
isConnected = true;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using DG.Tweening;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
|
@ -32,16 +31,16 @@ public class Tool_Screw : Tool_Base
|
|||
/// </summary>
|
||||
private bool isMoving;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 安装状态时Y的local值
|
||||
/// </summary>
|
||||
public float initPostionY;
|
||||
|
||||
/// <summary>
|
||||
/// 螺丝拆装事件回调
|
||||
/// </summary>
|
||||
private Action<bool> installAction;
|
||||
///// <summary>
|
||||
///// 螺丝拧紧时的位置
|
||||
///// </summary>
|
||||
//private float localYInstallValue;
|
||||
///// <summary>
|
||||
///// 螺丝拧松时的位置
|
||||
///// </summary>
|
||||
//private float localYUnInstallValue;
|
||||
|
||||
|
||||
protected override void OnAwake()
|
||||
|
|
@ -50,10 +49,6 @@ public class Tool_Screw : Tool_Base
|
|||
id = gameObject.name;
|
||||
}
|
||||
|
||||
public void AddAction(Action<bool> action)
|
||||
{
|
||||
this.installAction=action;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 被拧紧
|
||||
|
|
@ -69,7 +64,7 @@ public class Tool_Screw : Tool_Base
|
|||
screwdriver.transform.position = installPos.position;
|
||||
screwdriver.transform.localEulerAngles = installPos.localEulerAngles;
|
||||
//动画
|
||||
transform.DOLocalMoveY(initPostionY, 1)
|
||||
transform.DOLocalMoveY(transform.localPosition.y + 0.02f, 1)
|
||||
.OnUpdate(() =>
|
||||
{
|
||||
transform.RotateAroundLocal(Vector3.up, 1);
|
||||
|
|
@ -81,7 +76,6 @@ public class Tool_Screw : Tool_Base
|
|||
Debug.Log("螺丝已拧紧");
|
||||
isInstall = true;
|
||||
isMoving = false;
|
||||
installAction?.Invoke(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -100,7 +94,7 @@ public class Tool_Screw : Tool_Base
|
|||
screwdriver.transform.position = installPos.position;
|
||||
screwdriver.transform.localEulerAngles = installPos.localEulerAngles;
|
||||
//动画
|
||||
transform.DOLocalMoveY(initPostionY - 0.02f, 1)
|
||||
transform.DOLocalMoveY(transform.localPosition.y - 0.02f, 1)
|
||||
.OnUpdate(() =>
|
||||
{
|
||||
transform.RotateAroundLocal(Vector3.up, 1);
|
||||
|
|
@ -112,7 +106,6 @@ public class Tool_Screw : Tool_Base
|
|||
Debug.Log("螺丝已拧松");
|
||||
isInstall = false;
|
||||
isMoving = false;
|
||||
installAction?.Invoke(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,13 +44,13 @@ public class Tool_Screwdriver : Tool_Base
|
|||
Tool_Screw ts = hit.transform.GetComponent<Tool_Screw>();
|
||||
if (ts != null)
|
||||
{
|
||||
if(ts.id== "电能表盖子固定螺丝1" && !SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_seal_Left.isCut)
|
||||
if(ts.id== "电能表盖子固定螺丝1" && !Device_DirectAccessElectricEnergyMeteringDevice.instance.cover.cover_seal_Left.isCut)
|
||||
{
|
||||
Debug.Log("·âӡδ¼ô¶Ï");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ts.id == "电能表盖子固定螺丝2" && !SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_seal_Right.isCut)
|
||||
if (ts.id == "电能表盖子固定螺丝2" && !Device_DirectAccessElectricEnergyMeteringDevice.instance.cover.cover_seal_Right.isCut)
|
||||
{
|
||||
Debug.Log("·âӡδ¼ô¶Ï");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using static Unity.Burst.Intrinsics.X86.Avx;
|
||||
|
||||
/// <summary>
|
||||
/// 验电笔
|
||||
|
|
@ -43,7 +42,7 @@ public class Tool_TestPen : Tool_Base
|
|||
|
||||
if(isFlicker)
|
||||
{
|
||||
time += Time.deltaTime*3;
|
||||
time += Time.deltaTime;
|
||||
if (time < 1)
|
||||
{
|
||||
screem.materials[0].color = Color.red;
|
||||
|
|
@ -78,12 +77,10 @@ public class Tool_TestPen : Tool_Base
|
|||
var tmp = ((Device_CabinetDoor)device_base);
|
||||
//位置移动
|
||||
transform.position = tmp.testPosAndRot.position;
|
||||
transform.localEulerAngles = tmp.testPosAndRot.localEulerAngles;
|
||||
transform.eulerAngles = tmp.testPosAndRot.eulerAngles;
|
||||
Debug.Log("计量柜_柜门 已验电");
|
||||
isFlicker = tmp.hasElectricity;
|
||||
}
|
||||
|
||||
screem.materials[0].color = isFlicker ? Color.red : Color.white;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -97,12 +94,10 @@ public class Tool_TestPen : Tool_Base
|
|||
var tmp = ((Tool_Screw)tool_base);
|
||||
//位置移动
|
||||
transform.position = tmp.installPos.position;
|
||||
transform.localEulerAngles = tmp.installPos.localEulerAngles;
|
||||
transform.eulerAngles = tmp.installPos.eulerAngles;
|
||||
Debug.Log("螺丝 已验电");
|
||||
isFlicker = tmp.hasElectricity;
|
||||
}
|
||||
|
||||
screem.materials[0].color = isFlicker ? Color.red : Color.white;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -32,14 +32,14 @@ public class Tool_WireStripper : Tool_Base
|
|||
//´ò¿ª
|
||||
while (renderer.GetBlendShapeWeight(0) < 100)
|
||||
{
|
||||
vlaue += (Time.deltaTime * 200);
|
||||
vlaue += (Time.deltaTime * 100);
|
||||
renderer.SetBlendShapeWeight(0, vlaue);
|
||||
yield return null;
|
||||
}
|
||||
//¹Ø±Õ
|
||||
while (renderer.GetBlendShapeWeight(0) > 0)
|
||||
{
|
||||
vlaue -= (Time.deltaTime * 200);
|
||||
vlaue -= (Time.deltaTime * 100);
|
||||
renderer.SetBlendShapeWeight(0, vlaue);
|
||||
yield return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ public class LiveSceneManager : SingletonMono<LiveSceneManager>
|
|||
{
|
||||
[HideInInspector]
|
||||
public FirstPersonController firstPersonController;
|
||||
public GameObject currentTool;
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
|
|
|||
Loading…
Reference in New Issue