还原整个柜子
This commit is contained in:
parent
9470950064
commit
177a21c950
|
@ -52,7 +52,40 @@ public class Device_3Phase4WireMeter : Device_Base
|
||||||
/// <param name="isIntsalledState"></param>
|
/// <param name="isIntsalledState"></param>
|
||||||
public void Init(bool isIntsalledState)
|
public void Init(bool isIntsalledState)
|
||||||
{
|
{
|
||||||
if(!isIntsalledState)
|
if(isIntsalledState)
|
||||||
|
{
|
||||||
|
Debug.Log("电能表设置为初始状态");
|
||||||
|
//盖子盖上
|
||||||
|
cover.isOpen = false;
|
||||||
|
cover.transform.localPosition = new Vector3(0.0001220703f, 0.01112366f, -0.09854126f);
|
||||||
|
//左螺丝拧上
|
||||||
|
cover.cover_screw_Left.isInstall = true;
|
||||||
|
cover.cover_screw_Left.transform.localPosition = new Vector3(cover.cover_screw_Left.transform.localPosition.x, cover.cover_screw_Left.initPostionY, cover.cover_screw_Left.transform.localPosition.z);
|
||||||
|
//右螺丝拧上
|
||||||
|
cover.cover_screw_Right.isInstall = true;
|
||||||
|
cover.cover_screw_Right.transform.localPosition = new Vector3(cover.cover_screw_Right.transform.localPosition.x, cover.cover_screw_Right.initPostionY, cover.cover_screw_Right.transform.localPosition.z);
|
||||||
|
//左封印安装
|
||||||
|
cover.cover_seal_Left.isCut = false;
|
||||||
|
cover.cover_seal_Left.gameObject.SetActive(true);
|
||||||
|
//右封印安装
|
||||||
|
cover.cover_seal_Right.isCut = false;
|
||||||
|
cover.cover_seal_Right.gameObject.SetActive(true);
|
||||||
|
//左固定螺丝拧上
|
||||||
|
fix_screw_left.isInstall = true;
|
||||||
|
fix_screw_left.transform.localPosition = new Vector3(fix_screw_left.transform.localPosition.x, fix_screw_left.initPostionY , fix_screw_left.transform.localPosition.z);
|
||||||
|
//右固定螺丝拧上
|
||||||
|
fix_screw_right.isInstall = true;
|
||||||
|
fix_screw_right.transform.localPosition = new Vector3(fix_screw_right.transform.localPosition.x, fix_screw_right.initPostionY , fix_screw_right.transform.localPosition.z);
|
||||||
|
//接线螺丝全部拧上
|
||||||
|
jieXian_screws.ForEach(a =>
|
||||||
|
{
|
||||||
|
a.isInstall = true;
|
||||||
|
a.transform.localPosition = new Vector3(a.transform.localPosition.x, a.initPostionY, a.transform.localPosition.z);
|
||||||
|
});
|
||||||
|
//铭牌
|
||||||
|
namePlate.isChecked = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("电能表设置为拆下状态");
|
Debug.Log("电能表设置为拆下状态");
|
||||||
//盖子拆除
|
//盖子拆除
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
using Sirenix.Utilities;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
@ -58,6 +59,34 @@ public class Device_MeasuringCabinet : Device_Base
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 还原计量柜状态
|
||||||
|
/// </summary>
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
//还原三相四线电能表
|
||||||
|
meteringDevice.Init(true);
|
||||||
|
//还原柜门
|
||||||
|
cabinetDoor.isOpen = false;
|
||||||
|
cabinetDoor.transform.localEulerAngles = Vector3.zero;
|
||||||
|
cabinetDoor.transform.Find("计量柜锁2/计量柜锁3").localEulerAngles = Vector3.zero;
|
||||||
|
//还原插座
|
||||||
|
|
||||||
|
//还原进线开关
|
||||||
|
inSwitch.isOpen = true;
|
||||||
|
inSwitch.transform.localEulerAngles = new Vector3(0, 0, 0);
|
||||||
|
//还原电能表接线
|
||||||
|
jieXian_screws.ForEach(screw =>
|
||||||
|
{
|
||||||
|
screw.isConnected = true;
|
||||||
|
screw.transform.localPosition = new Vector3(screw.transform.localPosition.x, screw.InstallPosY, screw.transform.localPosition.z);
|
||||||
|
});
|
||||||
|
//还原杂物
|
||||||
|
sundries.gameObject.SetActive(false);
|
||||||
|
|
||||||
|
//刷新验电状态
|
||||||
|
CheckHasElectricity();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清空接线的螺丝参数
|
/// 清空接线的螺丝参数
|
||||||
|
|
|
@ -108,8 +108,8 @@ public class StepState_1002 : StepState
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
//»¹Ô¹ñ×Ó
|
||||||
|
SiteManager.instance.measuringCabinet.Init();
|
||||||
}
|
}
|
||||||
else if (num == 3008)
|
else if (num == 3008)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue