今日:
1,用电信息采集终端- 接线盒交互100% 2,用电信息采集终端- 绝缘胶带使用 100% 3,用电信息采集终端- 集中器和电能表操作100% 明日: 1、用电信息采集终端- 设备响应 问题: 无
This commit is contained in:
parent
aa7e191cb4
commit
818f4f1693
|
|
@ -10,15 +10,15 @@ public class JunctionBox : MonoBehaviour
|
|||
/// </summary>
|
||||
public Transform TransparentlidObj;
|
||||
|
||||
/// <summary>
|
||||
/// 横向滑块
|
||||
/// </summary>
|
||||
public Transform HorizontalSlider;
|
||||
///// <summary>
|
||||
///// 뷘蕨뺄욥
|
||||
///// </summary>
|
||||
//public Transform HorizontalSlider;
|
||||
|
||||
/// <summary>
|
||||
/// 纵向滑块
|
||||
/// </summary>
|
||||
public Transform VerticalSlider;
|
||||
///// <summary>
|
||||
///// 李蕨뺄욥
|
||||
///// </summary>
|
||||
//public Transform VerticalSlider;
|
||||
|
||||
/// <summary>
|
||||
/// 是否盖上
|
||||
|
|
@ -41,43 +41,31 @@ public class JunctionBox : MonoBehaviour
|
|||
if (hit.collider.gameObject.name == "盖_透明外壳")
|
||||
{
|
||||
TransparentlidObj.transform.DOLocalMove(new Vector3(0, -0.0914f, 0),2f);
|
||||
//判断盖子是否打开
|
||||
if (iscover)
|
||||
////털뙤맨綾角뤠댔역
|
||||
}
|
||||
if (!iscover)
|
||||
{
|
||||
//iscover = true;
|
||||
switch (hit.collider.gameObject.name)
|
||||
{
|
||||
switch (hit.collider.gameObject.name)
|
||||
{
|
||||
case "接线盒纵向滑块001":
|
||||
hit.collider.gameObject.transform.DOLocalMove(new Vector3(0.06131744f, 0.0638f, 0.0089f),1.5f);
|
||||
break;
|
||||
case "接线盒纵向滑块002":
|
||||
hit.collider.gameObject.transform.DOLocalMove(new Vector3(0.06131744f, -0.059f, 0.0089f), 1.5f);
|
||||
break;
|
||||
case "接线盒纵向滑块003":
|
||||
hit.collider.gameObject.transform.DOLocalMove(new Vector3(0.06131744f, 0.0638f, 0.0089f), 1.5f);
|
||||
break;
|
||||
case "接线盒纵向滑块004":
|
||||
hit.collider.gameObject.transform.DOLocalMove(new Vector3(0.06131744f, -0.059f, 0.0089f), 1.5f);
|
||||
break;
|
||||
//case "三相_有互感器_无光伏_接线盒_A相_横向下滑块_正确":
|
||||
|
||||
// break;
|
||||
//case "三相_有互感器_无光伏_接线盒_B相_横向下滑块_正确":
|
||||
|
||||
// break;
|
||||
//case "三相_有互感器_无光伏_接线盒_C相_横向下滑块_正确":
|
||||
|
||||
// break;
|
||||
//case "接线盒横向上滑块001":
|
||||
|
||||
// break;
|
||||
//case "接线盒横向上滑块002":
|
||||
|
||||
// break;
|
||||
//case "接线盒横向上滑块003":
|
||||
|
||||
// break;
|
||||
}
|
||||
case "쌈窟분李蕨뺄욥001":
|
||||
hit.collider.gameObject.transform.DOLocalMove(new Vector3(0.06131744f, -0.0075f, 0.0089f), 1f);
|
||||
Debug.Log(hit.collider.gameObject.name);
|
||||
break;
|
||||
case "쌈窟분李蕨뺄욥002":
|
||||
hit.collider.gameObject.transform.DOLocalMove(new Vector3(0.02013969f, -0.0075f, 0.0089f), 1f);
|
||||
Debug.Log(hit.collider.gameObject.name);
|
||||
break;
|
||||
case "쌈窟분李蕨뺄욥003":
|
||||
hit.collider.gameObject.transform.DOLocalMove(new Vector3(-0.02001452f, -0.0075f, 0.0089f), 1f);
|
||||
Debug.Log(hit.collider.gameObject.name);
|
||||
break;
|
||||
case "쌈窟분李蕨뺄욥004":
|
||||
hit.collider.gameObject.transform.DOLocalMove(new Vector3(-0.06075525f, -0.0075f, 0.0089f), 1f);
|
||||
Debug.Log(hit.collider.gameObject.name);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,12 +114,12 @@ Material:
|
|||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
- __dirty: 0
|
||||
- _step_p1: 0
|
||||
- _step_p2: 0
|
||||
- _step_p3: 0
|
||||
- _step_p4: 0
|
||||
- _step_p5: 0
|
||||
- _step_p6: 0
|
||||
- _step_p1: 1
|
||||
- _step_p2: 1
|
||||
- _step_p3: 1
|
||||
- _step_p4: 1
|
||||
- _step_p5: 1
|
||||
- _step_p6: 1
|
||||
m_Colors:
|
||||
- _BaseCol: {r: 0.23429155, g: 0.28497556, b: 0.3679245, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -16,19 +16,54 @@ public class Screwdriver : MonoBehaviour
|
|||
/// <summary>
|
||||
/// ÓÒ±ßÂÝË¿
|
||||
/// </summary>
|
||||
public Transform ScrewR;
|
||||
public GameObject ScrewR;
|
||||
|
||||
/// <summary>
|
||||
/// ×ó±ßÂÝË¿
|
||||
/// </summary>
|
||||
public Transform ScrewL;
|
||||
public GameObject ScrewL;
|
||||
|
||||
public InteractiveObjects[] interactiveObjects;
|
||||
/// <summary>
|
||||
/// 集中器左侧螺丝
|
||||
/// </summary>
|
||||
public GameObject LconcentratorScrew;
|
||||
|
||||
/// <summary>
|
||||
/// 集中器右侧螺丝
|
||||
/// </summary>
|
||||
public GameObject RconcentratorScrew;
|
||||
|
||||
/// <summary>
|
||||
/// 集线器螺丝和封印
|
||||
/// </summary>
|
||||
public GameObject[] concentratorScrew;
|
||||
|
||||
/// <summary>
|
||||
/// 螺丝
|
||||
/// </summary>
|
||||
public GameObject[] ScrewObj;
|
||||
|
||||
/// <summary>
|
||||
/// 集线盒电线动画
|
||||
/// </summary>
|
||||
public SkinnedMeshRenderer ElectricWireSMR;
|
||||
|
||||
/// <summary>
|
||||
/// 集中器盖子
|
||||
/// </summary>
|
||||
public GameObject HubCoverObj;
|
||||
|
||||
public InteractiveObjects[] interactiveObjects;
|
||||
|
||||
/// <summary>
|
||||
/// 拆完封印
|
||||
/// </summary>
|
||||
bool issplit;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
//StartCoroutine(IEElectricWire());
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
|
@ -51,17 +86,91 @@ public class Screwdriver : MonoBehaviour
|
|||
StartCoroutine(Lscrew());
|
||||
Debug.Log(hit.collider.gameObject.name);
|
||||
}
|
||||
if (hit.collider.gameObject.name == "壳固定螺丝_R")
|
||||
{
|
||||
Debug.Log(hit.collider.gameObject.name);
|
||||
StartCoroutine(IERconcentratorScrew());
|
||||
}
|
||||
if (hit.collider.gameObject.name == "壳固定螺丝_L")
|
||||
{
|
||||
Debug.Log(hit.collider.gameObject.name);
|
||||
StartCoroutine(IELconcentratorScrew());
|
||||
}
|
||||
for (int i = 0; i < ScrewObj.Length; i++)
|
||||
{
|
||||
if (hit.collider.gameObject.name == ScrewObj[i].name)
|
||||
{
|
||||
Debug.Log(hit.collider.gameObject.name);
|
||||
ScrewObj[i].gameObject.SetActive(false);
|
||||
}
|
||||
//if (!ScrewObj[i].gameObject.activeInHierarchy)
|
||||
//{
|
||||
// StartCoroutine(IEElectricWire());
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (AreAllObjectsHidden())
|
||||
{
|
||||
StartCoroutine(IEElectricWire());
|
||||
Debug.Log("所有螺丝都已隐藏");
|
||||
}
|
||||
if (AllHubOfHubs())
|
||||
{
|
||||
HubCoverObj.gameObject.SetActive(false);
|
||||
Debug.Log("所有集线器盖子螺丝都已隐藏");
|
||||
}
|
||||
}
|
||||
// 调用这个方法来检查所有游戏对象是否都被隐藏
|
||||
// 获取所有游戏对象
|
||||
// public GameObject[] allObjects = FindObjectsOfType<GameObject>();
|
||||
public bool AreAllObjectsHidden()
|
||||
{
|
||||
// 检查每个对象的激活状态
|
||||
foreach (GameObject obj in ScrewObj)
|
||||
{
|
||||
if (obj.activeInHierarchy) // 使用 activeInHierarchy 如果你想检查对象是否在其父级结构中被激活
|
||||
{
|
||||
return false; // 如果找到任何一个激活的对象,返回false
|
||||
}
|
||||
}
|
||||
return true; // 如果所有对象都未激活,返回true
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ÓÒ±ßÂÝË¿
|
||||
/// 集中器盖子螺丝
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool AllHubOfHubs()
|
||||
{
|
||||
// 检查每个对象的激活状态
|
||||
foreach (GameObject obj in concentratorScrew)
|
||||
{
|
||||
if (obj.activeInHierarchy) // 使用 activeInHierarchy 如果你想检查对象是否在其父级结构中被激活
|
||||
{
|
||||
return false; // 如果找到任何一个激活的对象,返回false
|
||||
}
|
||||
}
|
||||
return true; // 如果所有对象都未激活,返回true
|
||||
}
|
||||
/// <summary>
|
||||
/// 螺丝刀返回动画
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IEnumerator ScrewdriverBack()
|
||||
{
|
||||
ScrewdriverTrans.transform.DOLocalMove(new Vector3(3.274139f, 1.803738f, -1.191f), 1f);
|
||||
ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-90f, 0, 0), 1f);
|
||||
yield return new WaitForSeconds(2f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 接线盒右边螺丝
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IEnumerator Rscrew()
|
||||
{
|
||||
ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, 90),1f);
|
||||
ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, 90), 1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
ScrewdriverTrans.transform.DOLocalMove(new Vector3(3.2373f, 1.8549f, -1.244f), 1f);
|
||||
yield return new WaitForSeconds(1);
|
||||
|
|
@ -71,39 +180,105 @@ public class Screwdriver : MonoBehaviour
|
|||
yield return new WaitForSeconds(2f);
|
||||
ScrewR.transform.DOLocalMove(new Vector3(0.1316f, 0.036f, 0.0034f), 1.5f);
|
||||
yield return new WaitForSeconds(3f);
|
||||
Destroy(ScrewR);
|
||||
StartCoroutine(ScrewdriverBack());
|
||||
ScrewR.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ×ó±ßÂÝË¿
|
||||
/// 接线盒左边螺丝
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IEnumerator Lscrew()
|
||||
{
|
||||
ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, 90), 1f);
|
||||
ScrewdriverTrans.transform.DOLocalMove(new Vector3(3.2373f, 1.8284f, -1.3885f), 1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, -104.747f), 1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
ScrewdriverTrans.transform.DOLocalMove(new Vector3(3.2373f, 1.8284f, -1.3885f), 1f);
|
||||
ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, 90), 1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
|
||||
ScrewL.transform.DOLocalMove(new Vector3(-0.07357633f, -0.01137948f, -0.0366f), 1f);
|
||||
yield return new WaitForSeconds(2f);
|
||||
StartCoroutine(ScrewdriverBack());
|
||||
ScrewL.gameObject.SetActive(false);
|
||||
}
|
||||
//private void OnMouseEnter()
|
||||
//{
|
||||
// for (int i= 0; i < interactiveObjects.Length; i++)
|
||||
// {
|
||||
// interactiveObjects[i].enabled = true;
|
||||
// }
|
||||
|
||||
//}
|
||||
//private void OnMouseExit()
|
||||
//{
|
||||
// for (int i = 0; i < interactiveObjects.Length; i++)
|
||||
// {
|
||||
// interactiveObjects[i].enabled = false;
|
||||
// }
|
||||
//}
|
||||
/// <summary>
|
||||
/// 集中器右侧螺丝
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IEnumerator IERconcentratorScrew()
|
||||
{
|
||||
ScrewdriverTrans.transform.DOLocalMove(new Vector3(3.2669f, 2.0962f, -1.3294f), 1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, -104.747f), 1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, 90), 1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
RconcentratorScrew.transform.DOLocalMove(new Vector3(0.1143f, 0.0216f, -0.1031f), 1f);
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
StartCoroutine(ScrewdriverBack());
|
||||
RconcentratorScrew.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 集中器左侧螺丝
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IEnumerator IELconcentratorScrew()
|
||||
{
|
||||
ScrewdriverTrans.transform.DOLocalMove(new Vector3(3.2669f, 2.0962f, -1.4616f), 1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, -104.747f), 1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, 90), 1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
LconcentratorScrew.transform.DOLocalMove(new Vector3(-0.1188f, 0.0216f, -0.1031f), 1f);
|
||||
yield return new WaitForSeconds(2f);
|
||||
StartCoroutine(ScrewdriverBack());
|
||||
LconcentratorScrew.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 集线器螺丝拆完后电线动画
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IEnumerator IEElectricWire()
|
||||
{
|
||||
//yield return new WaitForSeconds(1f);
|
||||
for (int i = 0; i <= 100; i++)
|
||||
{
|
||||
yield return new WaitForSeconds(0.001f);
|
||||
ElectricWireSMR.SetBlendShapeWeight(0, i);
|
||||
}
|
||||
//yield return new WaitForSeconds(1f);
|
||||
for (int i = 0; i <= 100; i++)
|
||||
{
|
||||
yield return new WaitForSeconds(0.002f);
|
||||
ElectricWireSMR.SetBlendShapeWeight(1, i);
|
||||
}
|
||||
//yield return new WaitForSeconds(1f);
|
||||
for (int i = 0; i <= 100; i++)
|
||||
{
|
||||
yield return new WaitForSeconds(0.002f);
|
||||
ElectricWireSMR.SetBlendShapeWeight(2, i);
|
||||
}
|
||||
//yield return new WaitForSeconds(1f);
|
||||
for (int i = 0; i <= 100; i++)
|
||||
{
|
||||
yield return new WaitForSeconds(0.002f);
|
||||
ElectricWireSMR.SetBlendShapeWeight(3, i);
|
||||
}
|
||||
//yield return new WaitForSeconds(1f);
|
||||
for (int i = 0; i <= 100; i++)
|
||||
{
|
||||
yield return new WaitForSeconds(0.002f);
|
||||
ElectricWireSMR.SetBlendShapeWeight(4, i);
|
||||
}
|
||||
//yield return new WaitForSeconds(1f);
|
||||
for (int i = 0; i <= 100; i++)
|
||||
{
|
||||
yield return new WaitForSeconds(0.002f);
|
||||
ElectricWireSMR.SetBlendShapeWeight(5, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
using DG.Tweening;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 없鍍스던
|
||||
/// </summary>
|
||||
|
||||
public class AdhesiveTape : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// 없鍍스던
|
||||
/// </summary>
|
||||
public GameObject TapeOBJ;
|
||||
|
||||
/// <summary>
|
||||
/// 든窟품뙈스던
|
||||
/// </summary>
|
||||
public Material TapeMar;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
TapeMar.SetFloat("_step_p1", 0);
|
||||
TapeMar.SetFloat("_step_p2", 0);
|
||||
TapeMar.SetFloat("_step_p3", 0);
|
||||
TapeMar.SetFloat("_step_p4", 0);
|
||||
TapeMar.SetFloat("_step_p5", 0);
|
||||
TapeMar.SetFloat("_step_p6", 0);
|
||||
//TapeMar.SetFloat("_step_p1", 1);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{//Camera.transform.forward
|
||||
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||
RaycastHit hit;
|
||||
bool raycast = Physics.Raycast(ray, out hit);
|
||||
if (raycast)
|
||||
{
|
||||
if (hit.collider.gameObject.name == "pCylinder170")
|
||||
{
|
||||
StartCoroutine(tape());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator tape()
|
||||
{
|
||||
TapeOBJ.gameObject.transform.DOLocalMove(new Vector3(3.1215f, 2.1383f, -1.3484f),1f);
|
||||
yield return new WaitForSeconds(1f);
|
||||
TapeMar.SetFloat("_step_p1", 1);
|
||||
yield return new WaitForSeconds(1f);
|
||||
TapeMar.SetFloat("_step_p2", 1);
|
||||
yield return new WaitForSeconds(1f);
|
||||
TapeMar.SetFloat("_step_p3", 1);
|
||||
yield return new WaitForSeconds(1f);
|
||||
TapeMar.SetFloat("_step_p4", 1);
|
||||
yield return new WaitForSeconds(1f);
|
||||
TapeMar.SetFloat("_step_p5", 1);
|
||||
yield return new WaitForSeconds(1f);
|
||||
TapeMar.SetFloat("_step_p6", 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f7068b4c343d9d944a0c82f8b0232f78
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -4,7 +4,7 @@ using System.Collections.Generic;
|
|||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 剥线钳功能
|
||||
/// 剥线钳
|
||||
/// </summary>
|
||||
public class Pliers : MonoBehaviour
|
||||
{
|
||||
|
|
@ -19,20 +19,30 @@ public class Pliers : MonoBehaviour
|
|||
public SkinnedMeshRenderer PliersSki;
|
||||
|
||||
/// <summary>
|
||||
/// 柜门封印动画
|
||||
/// 柜门外封印动画
|
||||
/// </summary>
|
||||
public SkinnedMeshRenderer ElectricBoxSkinnedMeshRenderer;
|
||||
|
||||
/// <summary>
|
||||
/// 电箱里右边封印
|
||||
/// 电箱里端子排右边封印
|
||||
/// </summary>
|
||||
public SkinnedMeshRenderer RightSkinnedMeshRenderer;
|
||||
|
||||
/// <summary>
|
||||
/// 电箱里面左边封印
|
||||
/// 电箱端子排里面左边封印
|
||||
/// </summary>
|
||||
public SkinnedMeshRenderer LeftSkinnedMeshRenderer;
|
||||
|
||||
/// <summary>
|
||||
/// 集中器盖右边封印
|
||||
/// </summary>
|
||||
public SkinnedMeshRenderer RconcentratorSMR;
|
||||
|
||||
/// <summary>
|
||||
/// 集中器盖左边封印
|
||||
/// </summary>
|
||||
public SkinnedMeshRenderer LconcentratorSMR;
|
||||
|
||||
/// <summary>
|
||||
/// ±äµçÏäÃÅËø
|
||||
/// </summary>
|
||||
|
|
@ -79,22 +89,33 @@ public class Pliers : MonoBehaviour
|
|||
StartCoroutine(JunctionBoxLeft());
|
||||
Debug.Log(hit.collider.gameObject.name);
|
||||
}
|
||||
|
||||
if (hit.collider.gameObject.name == "集中器_封印R")
|
||||
{
|
||||
StartCoroutine(RightRconcentrator());
|
||||
Debug.Log(hit.collider.gameObject.name);
|
||||
}
|
||||
if (hit.collider.gameObject.name == "集中器_封印_L")
|
||||
{
|
||||
StartCoroutine(LeftRconcentrator());
|
||||
Debug.Log(hit.collider.gameObject.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float weight;
|
||||
|
||||
/// <summary>
|
||||
/// °þÏßǯ¶¯»
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IEnumerator PliersIE()
|
||||
{
|
||||
PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.33844f, 2.085f, -1.040039f),1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90,90,0),1.5f);
|
||||
yield return new WaitForSeconds(2f);
|
||||
PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.33844f, 2.033f, -1.043f),1f);
|
||||
yield return new WaitForSeconds(1f);
|
||||
//PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90,90,0),1.5f);
|
||||
//yield return new WaitForSeconds(2f);
|
||||
for (int i = 100; i >= 0; i--)
|
||||
{
|
||||
yield return new WaitForSeconds(0.01f);
|
||||
|
|
@ -112,7 +133,7 @@ public class Pliers : MonoBehaviour
|
|||
{
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
yield return new WaitForSeconds(0.01f);
|
||||
yield return new WaitForSeconds(0.001f);
|
||||
ElectricBoxSkinnedMeshRenderer.SetBlendShapeWeight(0, i);
|
||||
}
|
||||
yield return new WaitForSeconds(1f);
|
||||
|
|
@ -135,6 +156,10 @@ public class Pliers : MonoBehaviour
|
|||
StartCoroutine(PliersBack());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 剥线钳返回原点动画
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IEnumerator PliersBack()
|
||||
{
|
||||
PliersObj.gameObject.transform.DOMove(new Vector3(303.05f, 2.386f, 163.028f),1.5f);
|
||||
|
|
@ -149,27 +174,28 @@ public class Pliers : MonoBehaviour
|
|||
/// <returns></returns>
|
||||
IEnumerator JunctionBoxRight()
|
||||
{
|
||||
//PliersObj.gameObject.SetActive(true);
|
||||
PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90, 90, 0), 1.5f);
|
||||
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.1497f, 1.888f, -1.3079f), 1f);
|
||||
|
||||
PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90, 90, 0), 0.5f);
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.1497f, 1.888f, -1.3079f), 0.5f);
|
||||
yield return new WaitForSeconds(2f);
|
||||
for (int i = 100; i >= 0; i--)
|
||||
{
|
||||
yield return new WaitForSeconds(0.01f);
|
||||
yield return new WaitForSeconds(0.001f);
|
||||
PliersSki.SetBlendShapeWeight(0, i);
|
||||
}
|
||||
yield return new WaitForSeconds(3f);
|
||||
yield return new WaitForSeconds(2f);
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
yield return new WaitForSeconds(0.01f);
|
||||
yield return new WaitForSeconds(0.001f);
|
||||
RightSkinnedMeshRenderer.SetBlendShapeWeight(0, i);
|
||||
}
|
||||
RightSkinnedMeshRenderer.gameObject.transform.DOLocalMove(new Vector3(0.0746f, 0.0004f, -0.0416f), 1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
StartCoroutine(PliersBack());
|
||||
Destroy(RightSkinnedMeshRenderer);
|
||||
RightSkinnedMeshRenderer.gameObject.SetActive(false);
|
||||
// Destroy(RightSkinnedMeshRenderer);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -179,12 +205,67 @@ public class Pliers : MonoBehaviour
|
|||
IEnumerator JunctionBoxLeft()
|
||||
{
|
||||
//PliersObj.gameObject.SetActive(true);
|
||||
PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90, 90, 0), 1.5f);
|
||||
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90, 90, 0), 0.5f);
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.1672f, 1.8637f, -1.4392f), 1f);
|
||||
yield return new WaitForSeconds(2f);
|
||||
for (int i = 100; i >= 0; i--)
|
||||
{
|
||||
yield return new WaitForSeconds(0.001f);
|
||||
PliersSki.SetBlendShapeWeight(0, i);
|
||||
}
|
||||
yield return new WaitForSeconds(1f);
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
yield return new WaitForSeconds(0.001f);
|
||||
LeftSkinnedMeshRenderer.SetBlendShapeWeight(0, i);
|
||||
}
|
||||
LeftSkinnedMeshRenderer.gameObject.transform.DOLocalMove(new Vector3(-0.0744f, -0.0247f, -0.043f), 1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
StartCoroutine(PliersBack());
|
||||
LeftSkinnedMeshRenderer.gameObject.SetActive(false);
|
||||
//Destroy(LeftSkinnedMeshRenderer);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 集中器右边封印
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IEnumerator RightRconcentrator()
|
||||
{
|
||||
PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90, 90, 0), 1.5f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.1687f, 2.1218f, -1.4082f), 1f);
|
||||
yield return new WaitForSeconds(2f);
|
||||
for (int i = 100; i >= 0; i--)
|
||||
{
|
||||
yield return new WaitForSeconds(0.001f);
|
||||
PliersSki.SetBlendShapeWeight(0, i);
|
||||
}
|
||||
yield return new WaitForSeconds(3f);
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
yield return new WaitForSeconds(0.001f);
|
||||
RconcentratorSMR.SetBlendShapeWeight(0, i);
|
||||
}
|
||||
RconcentratorSMR.gameObject.transform.DOLocalMove(new Vector3(-0.066f, 0.0611f, -0.1134f), 1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
StartCoroutine(PliersBack());
|
||||
RconcentratorSMR.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 集中器左边封印
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IEnumerator LeftRconcentrator()
|
||||
{
|
||||
PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90, 90, 0), 1.5f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.1683f, 2.1293f, -1.5439f), 1f);
|
||||
yield return new WaitForSeconds(2f);
|
||||
for (int i = 100; i >= 0; i--)
|
||||
{
|
||||
yield return new WaitForSeconds(0.01f);
|
||||
PliersSki.SetBlendShapeWeight(0, i);
|
||||
|
|
@ -193,11 +274,11 @@ public class Pliers : MonoBehaviour
|
|||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
yield return new WaitForSeconds(0.01f);
|
||||
LeftSkinnedMeshRenderer.SetBlendShapeWeight(0, i);
|
||||
LconcentratorSMR.SetBlendShapeWeight(0, i);
|
||||
}
|
||||
LeftSkinnedMeshRenderer.gameObject.transform.DOLocalMove(new Vector3(-0.0744f, -0.0247f, -0.043f), 1f);
|
||||
LconcentratorSMR.gameObject.transform.DOLocalMove(new Vector3(-0.0659f, 0.0829f, -0.1134f), 1f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
StartCoroutine(PliersBack());
|
||||
Destroy(LeftSkinnedMeshRenderer);
|
||||
LconcentratorSMR.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,11 +16,6 @@ public class Fieldobservation : MonoBehaviour
|
|||
/// </summary>
|
||||
public Button ExclamationPointBtn;
|
||||
|
||||
///// <summary>
|
||||
///// 封印动画
|
||||
///// </summary>
|
||||
//public SkinnedMeshRenderer SkinnedMeshRenderer;
|
||||
|
||||
bool isclick;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -28,21 +23,6 @@ public class Fieldobservation : MonoBehaviour
|
|||
/// </summary>
|
||||
public Transform UptheladderPos;
|
||||
|
||||
///// <summary>
|
||||
///// 梯子点位
|
||||
///// </summary>
|
||||
//public Transform LadderPos;
|
||||
|
||||
///// <summary>
|
||||
///// 变电箱门锁
|
||||
///// </summary>
|
||||
//public Transform Doorlock;
|
||||
|
||||
///// <summary>
|
||||
///// 变电箱左门
|
||||
///// </summary>
|
||||
//public Transform DoorOfCabinet;
|
||||
|
||||
/// <summary>
|
||||
/// 打开封印
|
||||
/// </summary>
|
||||
|
|
@ -54,71 +34,8 @@ public class Fieldobservation : MonoBehaviour
|
|||
|
||||
void Update()
|
||||
{
|
||||
//if (Input.GetMouseButtonDown(0))
|
||||
//{
|
||||
// Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||
// RaycastHit hit;
|
||||
// bool raycast = Physics.Raycast(ray, out hit);
|
||||
// if (raycast)
|
||||
// {
|
||||
// if (hit.collider.gameObject.name == "柜门_封印")
|
||||
// {
|
||||
// //播放动画
|
||||
// StartCoroutine(OpenLock());
|
||||
|
||||
// Debug.Log(hit.collider.gameObject.name);
|
||||
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
///// <summary>
|
||||
///// 打开封印动画
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//IEnumerator OpenLock()
|
||||
//{
|
||||
// for (int i = 0; i < 100; i++)
|
||||
// {
|
||||
// yield return new WaitForSeconds(0.01f);
|
||||
// SkinnedMeshRenderer.SetBlendShapeWeight(0, i);
|
||||
// }
|
||||
// yield return new WaitForSeconds(1f);
|
||||
// SkinnedMeshRenderer.gameObject.transform.DOLocalMove(new Vector3(0.637f, 0.12f, -0.015f),0.5f);
|
||||
// yield return new WaitForSeconds(2f);
|
||||
// Destroy(SkinnedMeshRenderer);
|
||||
// StartCoroutine(OpenDoor());
|
||||
//}
|
||||
//IEnumerator OpenDoor()
|
||||
//{
|
||||
// yield return new WaitForSeconds(1f);
|
||||
// Doorlock.transform.DOLocalRotate(new Vector3(160, 0, 0), 2f);
|
||||
// yield return new WaitForSeconds(3f);
|
||||
// DoorOfCabinet.transform.DOLocalRotate(new Vector3(-90, 160, 0), 2f);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 柜门先后动画
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
//IEnumerator OpenDoor()
|
||||
//{
|
||||
// Doorlock069.DOLocalRotate(new Vector3(150, 0, 0), 1f);
|
||||
// yield return new WaitForSeconds(2f);
|
||||
// LeftDoor.DOLocalRotate(new Vector3(150, 0, 0), 2f);
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 用户触发
|
||||
///// </summary>
|
||||
///// <param name="other"></param>
|
||||
//private void OnTriggerEnter(Collider other)
|
||||
//{
|
||||
// if (other.name == "LadderPos")
|
||||
// {
|
||||
// UpladderBtn.gameObject.SetActive(true);
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 用户离开npc警告按钮消失
|
||||
|
|
@ -130,10 +47,5 @@ public class Fieldobservation : MonoBehaviour
|
|||
{
|
||||
ExclamationPointBtn.gameObject.SetActive(false);
|
||||
}
|
||||
//if (other.name == "LadderPos")
|
||||
//{
|
||||
// UpladderBtn.gameObject.SetActive(false);
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ using UnityEngine.UI;
|
|||
public class WorkPermit : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// 工作证
|
||||
/// ¹¤×÷ÅÆ
|
||||
/// </summary>
|
||||
public GameObject WorkPermitObj;
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ public class WorkPermit : MonoBehaviour
|
|||
public Text DialogboxText;
|
||||
|
||||
/// <summary>
|
||||
/// 下一步按钮
|
||||
/// ¼ÌÐø°´Å¥
|
||||
/// </summary>
|
||||
public Button ContinueBtn;
|
||||
|
||||
|
|
@ -38,6 +38,7 @@ public class WorkPermit : MonoBehaviour
|
|||
void Start()
|
||||
{
|
||||
NextlBtn.gameObject.SetActive(false);
|
||||
ContinueBtn.gameObject.SetActive(true);
|
||||
DialogboxText.text = null;
|
||||
ContinueBtn.onClick.AddListener(() =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue