Merge branch 'SXElectricityInformationAcquisition' of http://gitea.umayle.com/huangjiayu/ShanxiKnowledgeBase into SXElectricityInformationAcquisition

# Conflicts:
#	SXElectricityInformationAcquisition/Assets/Screwdriver.cs
This commit is contained in:
yzx 2024-06-12 14:54:17 +08:00
commit 9b9874de4c
5 changed files with 130 additions and 81 deletions

View File

@ -10,15 +10,10 @@ public class JunctionBox : MonoBehaviour
/// </summary> /// </summary>
public Transform TransparentlidObj; public Transform TransparentlidObj;
///// <summary> /// <summary>
///// 横向滑块 /// 端子排上所有封印螺丝
///// </summary> /// </summary>
//public Transform HorizontalSlider; public GameObject[] allObjects;
///// <summary>
///// 纵向滑块
///// </summary>
//public Transform VerticalSlider;
/// <summary> /// <summary>
/// ÊÇ·ñ¸ÇÉÏ /// ÊÇ·ñ¸ÇÉÏ
@ -29,6 +24,7 @@ public class JunctionBox : MonoBehaviour
{ {
} }
void Update() void Update()
{ {
if (Input.GetMouseButtonDown(0)) if (Input.GetMouseButtonDown(0))
@ -38,11 +34,11 @@ public class JunctionBox : MonoBehaviour
bool raycast = Physics.Raycast(ray, out hit); bool raycast = Physics.Raycast(ray, out hit);
if (raycast) if (raycast)
{ {
if (hit.collider.gameObject.name == "盖_透明外壳") //if (hit.collider.gameObject.name == "盖_透明外壳")
{ //{
TransparentlidObj.transform.DOLocalMove(new Vector3(0, -0.0914f, 0),2f); // TransparentlidObj.transform.DOLocalMove(new Vector3(0, -0.0914f, 0),2f);
////判断盖子是否打开 // ////判断盖子是否打开
} // }
if (!iscover) if (!iscover)
{ {
//iscover = true; //iscover = true;
@ -65,9 +61,27 @@ public class JunctionBox : MonoBehaviour
Debug.Log(hit.collider.gameObject.name); Debug.Log(hit.collider.gameObject.name);
break; break;
} }
}
}
}
if (AreAllObjectsHidden())
{
TransparentlidObj.transform.DOLocalMove(new Vector3(0, -0.0914f, 0), 2f);
Debug.Log("所有对象都已隐藏");
}
}
public bool AreAllObjectsHidden()
{
// 检查每个对象的激活状态
foreach (GameObject obj in allObjects)
{
if (obj.activeInHierarchy) // 使用 activeInHierarchy 如果你想检查对象是否在其父级结构中被激活
{
return false; // 如果找到任何一个激活的对象返回false
}
}
}
} return true; // 如果所有对象都未激活返回true
}
} }
} }

View File

@ -2,7 +2,7 @@ fileFormatVersion: 2
guid: ddf175dcba94e8d46bc6b6d68d61c395 guid: ddf175dcba94e8d46bc6b6d68d61c395
NativeFormatImporter: NativeFormatImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 2100000 mainObjectFileID: 0
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,8 +1,6 @@
using DG.Tweening; using DG.Tweening;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using DefaultNamespace.ProcessMode;
using MotionFramework;
using UnityEngine; using UnityEngine;
/// <summary> /// <summary>
@ -36,13 +34,13 @@ public class Screwdriver : MonoBehaviour
public GameObject RconcentratorScrew; public GameObject RconcentratorScrew;
/// <summary> /// <summary>
/// 集线器螺丝和封印 /// 集线器外壳螺丝和封印
/// </summary> /// </summary>
public GameObject[] concentratorScrew; public GameObject[] concentratorScrew;
/// <summary> /// <summary>
/// 螺丝 /// 螺丝
/// </summary>a /// </summary>
public GameObject[] ScrewObj; public GameObject[] ScrewObj;
/// <summary> /// <summary>
@ -50,6 +48,11 @@ public class Screwdriver : MonoBehaviour
/// </summary> /// </summary>
public SkinnedMeshRenderer ElectricWireSMR; public SkinnedMeshRenderer ElectricWireSMR;
/// <summary>
/// 电线碰撞
/// </summary>
public BoxCollider ElectricWireBcr;
/// <summary> /// <summary>
/// 集中器盖子 /// 集中器盖子
/// </summary> /// </summary>
@ -65,7 +68,12 @@ public class Screwdriver : MonoBehaviour
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
//StartCoroutine(IEElectricWire()); Init();
}
void Init()
{
ElectricWireBcr.enabled = false;
} }
// Update is called once per frame // Update is called once per frame
@ -103,7 +111,7 @@ public class Screwdriver : MonoBehaviour
if (hit.collider.gameObject.name == ScrewObj[i].name) if (hit.collider.gameObject.name == ScrewObj[i].name)
{ {
Debug.Log(hit.collider.gameObject.name); Debug.Log(hit.collider.gameObject.name);
MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject); StartCoroutine(IEHubSegmentRowScrews());
ScrewObj[i].gameObject.SetActive(false); ScrewObj[i].gameObject.SetActive(false);
} }
//if (!ScrewObj[i].gameObject.activeInHierarchy) //if (!ScrewObj[i].gameObject.activeInHierarchy)
@ -113,20 +121,26 @@ public class Screwdriver : MonoBehaviour
} }
} }
} }
//集中器螺丝全隐藏后播放电线动画
if (AreAllObjectsHidden()) if (AreAllObjectsHidden())
{ {
StartCoroutine(ScrewdriverBack());
ElectricWireBcr.enabled = true;
StartCoroutine(IEElectricWire()); StartCoroutine(IEElectricWire());
Debug.Log("所有螺丝都已隐藏"); Debug.Log("所有螺丝都已隐藏");
} }
//集中器外壳上的封印和螺丝
if (AllHubOfHubs()) if (AllHubOfHubs())
{ {
HubCoverObj.gameObject.SetActive(false); HubCoverObj.gameObject.transform.DOLocalMove(new Vector3(0, 0.0167f, -0.2387f),1);
Debug.Log("所有集线器盖子螺丝都已隐藏"); Debug.Log("所有集线器盖子螺丝都已隐藏");
} }
} }
// 调用这个方法来检查所有游戏对象是否都被隐藏
// 获取所有游戏对象 /// <summary>
// public GameObject[] allObjects = FindObjectsOfType<GameObject>(); /// 集中器螺丝
/// </summary>
/// <returns></returns>
public bool AreAllObjectsHidden() public bool AreAllObjectsHidden()
{ {
// 检查每个对象的激活状态 // 检查每个对象的激活状态
@ -141,7 +155,7 @@ public class Screwdriver : MonoBehaviour
} }
/// <summary> /// <summary>
/// 集中器盖子螺丝 /// 集中器外壳上的封印和螺丝
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public bool AllHubOfHubs() public bool AllHubOfHubs()
@ -162,8 +176,8 @@ public class Screwdriver : MonoBehaviour
/// <returns></returns> /// <returns></returns>
IEnumerator ScrewdriverBack() IEnumerator ScrewdriverBack()
{ {
ScrewdriverTrans.transform.DOLocalMove(new Vector3(3.274139f, 1.803738f, -1.191f), 1f); ScrewdriverTrans.transform.DOLocalMove(new Vector3(3.274139f, 1.803738f, -1.191f), 0.5f);
ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-90f, 0, 0), 1f); ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-90f, 0, 0), 0.5f);
yield return new WaitForSeconds(2f); yield return new WaitForSeconds(2f);
} }
@ -173,16 +187,16 @@ public class Screwdriver : MonoBehaviour
/// <returns></returns> /// <returns></returns>
IEnumerator Rscrew() IEnumerator Rscrew()
{ {
ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, 90), 1f); ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, 90), 0.5f);
yield return new WaitForSeconds(1.5f); yield return new WaitForSeconds(0.6f);
ScrewdriverTrans.transform.DOLocalMove(new Vector3(3.2373f, 1.8549f, -1.244f), 1f); ScrewdriverTrans.transform.DOLocalMove(new Vector3(3.2373f, 1.8549f, -1.244f), 1f);
yield return new WaitForSeconds(1); yield return new WaitForSeconds(1);
ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, -104.747f), 1f); ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, -104.747f), 1f);
yield return new WaitForSeconds(1.5f); yield return new WaitForSeconds(1.2f);
ScrewdriverTrans.transform.DOLocalMove(new Vector3(3.191f, 1.831f, -1.158f), 1f); ScrewdriverTrans.transform.DOLocalMove(new Vector3(3.191f, 1.831f, -1.158f), 1f);
yield return new WaitForSeconds(2f); yield return new WaitForSeconds(1.5f);
ScrewR.transform.DOLocalMove(new Vector3(0.1316f, 0.036f, 0.0034f), 1.5f); ScrewR.transform.DOLocalMove(new Vector3(0.1316f, 0.036f, 0.0034f), 1.6f);
yield return new WaitForSeconds(3f); yield return new WaitForSeconds(1.2f);
StartCoroutine(ScrewdriverBack()); StartCoroutine(ScrewdriverBack());
ScrewR.gameObject.SetActive(false); ScrewR.gameObject.SetActive(false);
} }
@ -193,19 +207,18 @@ public class Screwdriver : MonoBehaviour
/// <returns></returns> /// <returns></returns>
IEnumerator Lscrew() IEnumerator Lscrew()
{ {
ScrewdriverTrans.transform.DOLocalMove(new Vector3(3.2373f, 1.8284f, -1.3885f), 1f); ScrewdriverTrans.transform.DOLocalMove(new Vector3(3.2373f, 1.8284f, -1.3885f), 0.5f);
yield return new WaitForSeconds(1.5f); yield return new WaitForSeconds(0.6f);
ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, -104.747f), 1f); ScrewdriverTrans.transform.DOLocalRotate(new Vector3(-19.741f, -113.296f, -104.747f), 1f);
yield return new WaitForSeconds(1.5f); yield return new WaitForSeconds(1f);
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); yield return new WaitForSeconds(1.5f);
ScrewL.transform.DOLocalMove(new Vector3(-0.07357633f, -0.01137948f, -0.0366f), 1f); ScrewL.transform.DOLocalMove(new Vector3(-0.07357633f, -0.01137948f, -0.0366f), 1f);
yield return new WaitForSeconds(2f); yield return new WaitForSeconds(1.2f);
StartCoroutine(ScrewdriverBack()); StartCoroutine(ScrewdriverBack());
ScrewL.gameObject.SetActive(false); ScrewL.gameObject.SetActive(false);
} }
/// <summary> /// <summary>
/// 集中器右侧螺丝 /// 集中器右侧螺丝
/// </summary> /// </summary>
@ -254,35 +267,36 @@ public class Screwdriver : MonoBehaviour
yield return new WaitForSeconds(0.001f); yield return new WaitForSeconds(0.001f);
ElectricWireSMR.SetBlendShapeWeight(0, i); ElectricWireSMR.SetBlendShapeWeight(0, i);
} }
//yield return new WaitForSeconds(1f);
for (int i = 0; i <= 100; i++) for (int i = 0; i <= 100; i++)
{ {
yield return new WaitForSeconds(0.002f); yield return new WaitForSeconds(0.002f);
ElectricWireSMR.SetBlendShapeWeight(1, i); ElectricWireSMR.SetBlendShapeWeight(1, i);
} }
//yield return new WaitForSeconds(1f);
for (int i = 0; i <= 100; i++) for (int i = 0; i <= 100; i++)
{ {
yield return new WaitForSeconds(0.002f); yield return new WaitForSeconds(0.002f);
ElectricWireSMR.SetBlendShapeWeight(2, i); ElectricWireSMR.SetBlendShapeWeight(2, i);
} }
//yield return new WaitForSeconds(1f);
for (int i = 0; i <= 100; i++) for (int i = 0; i <= 100; i++)
{ {
yield return new WaitForSeconds(0.002f); yield return new WaitForSeconds(0.002f);
ElectricWireSMR.SetBlendShapeWeight(3, i); ElectricWireSMR.SetBlendShapeWeight(3, i);
} }
//yield return new WaitForSeconds(1f);
for (int i = 0; i <= 100; i++) for (int i = 0; i <= 100; i++)
{ {
yield return new WaitForSeconds(0.002f); yield return new WaitForSeconds(0.002f);
ElectricWireSMR.SetBlendShapeWeight(4, i); ElectricWireSMR.SetBlendShapeWeight(4, i);
} }
//yield return new WaitForSeconds(1f);
for (int i = 0; i <= 100; i++) for (int i = 0; i <= 100; i++)
{ {
yield return new WaitForSeconds(0.002f); yield return new WaitForSeconds(0.002f);
ElectricWireSMR.SetBlendShapeWeight(5, i); ElectricWireSMR.SetBlendShapeWeight(5, i);
} }
} }
IEnumerator IEHubSegmentRowScrews()
{
ScrewdriverTrans.gameObject.transform.DOLocalMove(new Vector3(3.1215f, 2.1383f, -1.3484f),0.5f);
yield return new WaitForSeconds(1);
}
} }

View File

@ -42,13 +42,17 @@ using UnityEngine;
{ {
if (hit.collider.gameObject.name == "pCylinder170") if (hit.collider.gameObject.name == "pCylinder170")
{ {
StartCoroutine(tape()); StartCoroutine(Tape());
} }
} }
} }
} }
IEnumerator tape() /// <summary>
/// 电线缠
/// </summary>
/// <returns></returns>
IEnumerator Tape()
{ {
TapeOBJ.gameObject.transform.DOLocalMove(new Vector3(3.1215f, 2.1383f, -1.3484f),1f); TapeOBJ.gameObject.transform.DOLocalMove(new Vector3(3.1215f, 2.1383f, -1.3484f),1f);
yield return new WaitForSeconds(1f); yield return new WaitForSeconds(1f);
@ -63,5 +67,19 @@ using UnityEngine;
TapeMar.SetFloat("_step_p5", 1); TapeMar.SetFloat("_step_p5", 1);
yield return new WaitForSeconds(1f); yield return new WaitForSeconds(1f);
TapeMar.SetFloat("_step_p6", 1); TapeMar.SetFloat("_step_p6", 1);
yield return new WaitForSeconds(1f);
StartCoroutine(TapeBack());
} }
/// <summary>
/// 胶带返回动画
/// </summary>
/// <returns></returns>
IEnumerator TapeBack()
{
TapeOBJ.transform.DOLocalMove(new Vector3(3.179443f, 1.790938f, -1.107346f),1f);
yield return null;
}
} }

View File

@ -14,7 +14,7 @@ public class Pliers : MonoBehaviour
public GameObject PliersObj; public GameObject PliersObj;
/// <summary> /// <summary>
/// ǯÏß¶¯»­ /// 剥线钳动画
/// </summary> /// </summary>
public SkinnedMeshRenderer PliersSki; public SkinnedMeshRenderer PliersSki;
@ -60,6 +60,12 @@ public class Pliers : MonoBehaviour
void Start() void Start()
{ {
Init();
}
void Init()
{
PliersSki.SetBlendShapeWeight(0, 0);
//PliersAni.Play("Ïßǯ"); //PliersAni.Play("Ïßǯ");
} }
@ -118,15 +124,15 @@ public class Pliers : MonoBehaviour
//yield return new WaitForSeconds(2f); //yield return new WaitForSeconds(2f);
for (int i = 100; i >= 0; i--) for (int i = 100; i >= 0; i--)
{ {
yield return new WaitForSeconds(0.01f); yield return new WaitForSeconds(0.001f);
PliersSki.SetBlendShapeWeight(0, i); PliersSki.SetBlendShapeWeight(0, i);
} }
yield return new WaitForSeconds(1f); yield return new WaitForSeconds(0.1f);
StartCoroutine(OpenLock()); StartCoroutine(OpenLock());
} }
/// <summary> /// <summary>
/// ´ò¿ª·âÓ¡¶¯»­ /// 打开柜门封印动画
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
IEnumerator OpenLock() IEnumerator OpenLock()
@ -136,10 +142,10 @@ public class Pliers : MonoBehaviour
yield return new WaitForSeconds(0.001f); yield return new WaitForSeconds(0.001f);
ElectricBoxSkinnedMeshRenderer.SetBlendShapeWeight(0, i); ElectricBoxSkinnedMeshRenderer.SetBlendShapeWeight(0, i);
} }
yield return new WaitForSeconds(0.1f);
ElectricBoxSkinnedMeshRenderer.gameObject.transform.DOLocalMove(new Vector3(0.637f, 0.12f, -0.015f), 0.5f);
yield return new WaitForSeconds(1f); yield return new WaitForSeconds(1f);
ElectricBoxSkinnedMeshRenderer.gameObject.transform.DOLocalMove(new Vector3(0.637f, 0.12f, -0.015f), 1f); ElectricBoxSkinnedMeshRenderer.gameObject.SetActive(false);
yield return new WaitForSeconds(2f);
Destroy(ElectricBoxSkinnedMeshRenderer);
StartCoroutine(OpenDoor()); StartCoroutine(OpenDoor());
} }
@ -149,7 +155,7 @@ public class Pliers : MonoBehaviour
/// <returns></returns> /// <returns></returns>
IEnumerator OpenDoor() IEnumerator OpenDoor()
{ {
yield return new WaitForSeconds(0.5f); //yield return new WaitForSeconds(0.5f);
Doorlock.transform.DOLocalRotate(new Vector3(160, 0, 0), 1f); Doorlock.transform.DOLocalRotate(new Vector3(160, 0, 0), 1f);
yield return new WaitForSeconds(1.5f); yield return new WaitForSeconds(1.5f);
DoorOfCabinet.transform.DOLocalRotate(new Vector3(-90, 0, 160), 2f); DoorOfCabinet.transform.DOLocalRotate(new Vector3(-90, 0, 160), 2f);
@ -162,9 +168,9 @@ public class Pliers : MonoBehaviour
/// <returns></returns> /// <returns></returns>
IEnumerator PliersBack() IEnumerator PliersBack()
{ {
PliersObj.gameObject.transform.DOMove(new Vector3(303.05f, 2.386f, 163.028f),1.5f); PliersObj.gameObject.transform.DOMove(new Vector3(303.05f, 2.386f, 163.028f),1f);
PliersObj.gameObject.transform.DORotate(new Vector3(0,90,0),1.5f); PliersObj.gameObject.transform.DORotate(new Vector3(0,90,0),1f);
yield return new WaitForSeconds(2f); yield return new WaitForSeconds(1.5f);
//PliersObj.gameObject.SetActive(false); //PliersObj.gameObject.SetActive(false);
} }
@ -174,18 +180,16 @@ public class Pliers : MonoBehaviour
/// <returns></returns> /// <returns></returns>
IEnumerator JunctionBoxRight() IEnumerator JunctionBoxRight()
{ {
PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90, 90, 0), 0.5f); PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90, 90, 0), 0.5f);
yield return new WaitForSeconds(1f); yield return new WaitForSeconds(1f);
PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.1497f, 1.888f, -1.3079f), 0.5f); PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.1497f, 1.888f, -1.3079f), 0.5f);
yield return new WaitForSeconds(2f); yield return new WaitForSeconds(1f);
for (int i = 100; i >= 0; i--) for (int i = 100; i >= 0; i--)
{ {
yield return new WaitForSeconds(0.001f); yield return new WaitForSeconds(0.001f);
PliersSki.SetBlendShapeWeight(0, i); PliersSki.SetBlendShapeWeight(0, i);
} }
yield return new WaitForSeconds(2f); yield return new WaitForSeconds(0.5f);
for (int i = 0; i < 100; i++) for (int i = 0; i < 100; i++)
{ {
yield return new WaitForSeconds(0.001f); yield return new WaitForSeconds(0.001f);
@ -206,10 +210,9 @@ public class Pliers : MonoBehaviour
{ {
//PliersObj.gameObject.SetActive(true); //PliersObj.gameObject.SetActive(true);
PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90, 90, 0), 0.5f); PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90, 90, 0), 0.5f);
yield return new WaitForSeconds(0.8f);
yield return new WaitForSeconds(1f);
PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.1672f, 1.8637f, -1.4392f), 1f); PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.1672f, 1.8637f, -1.4392f), 1f);
yield return new WaitForSeconds(2f); yield return new WaitForSeconds(1.5f);
for (int i = 100; i >= 0; i--) for (int i = 100; i >= 0; i--)
{ {
yield return new WaitForSeconds(0.001f); yield return new WaitForSeconds(0.001f);
@ -221,8 +224,8 @@ public class Pliers : MonoBehaviour
yield return new WaitForSeconds(0.001f); yield return new WaitForSeconds(0.001f);
LeftSkinnedMeshRenderer.SetBlendShapeWeight(0, i); LeftSkinnedMeshRenderer.SetBlendShapeWeight(0, i);
} }
LeftSkinnedMeshRenderer.gameObject.transform.DOLocalMove(new Vector3(-0.0744f, -0.0247f, -0.043f), 1f); LeftSkinnedMeshRenderer.gameObject.transform.DOLocalMove(new Vector3(-0.0744f, -0.0247f, -0.043f), 0.5f);
yield return new WaitForSeconds(1.5f); yield return new WaitForSeconds(1f);
StartCoroutine(PliersBack()); StartCoroutine(PliersBack());
LeftSkinnedMeshRenderer.gameObject.SetActive(false); LeftSkinnedMeshRenderer.gameObject.SetActive(false);
//Destroy(LeftSkinnedMeshRenderer); //Destroy(LeftSkinnedMeshRenderer);
@ -234,23 +237,23 @@ public class Pliers : MonoBehaviour
/// <returns></returns> /// <returns></returns>
IEnumerator RightRconcentrator() IEnumerator RightRconcentrator()
{ {
PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90, 90, 0), 1.5f); PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90, 90, 0), 0.5f);
yield return new WaitForSeconds(1.5f); yield return new WaitForSeconds(1.2f);
PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.1687f, 2.1218f, -1.4082f), 1f); PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.1687f, 2.1218f, -1.4082f), 1f);
yield return new WaitForSeconds(2f); yield return new WaitForSeconds(1f);
for (int i = 100; i >= 0; i--) for (int i = 100; i >= 0; i--)
{ {
yield return new WaitForSeconds(0.001f); yield return new WaitForSeconds(0.001f);
PliersSki.SetBlendShapeWeight(0, i); PliersSki.SetBlendShapeWeight(0, i);
} }
yield return new WaitForSeconds(3f); yield return new WaitForSeconds(1f);
for (int i = 0; i < 100; i++) for (int i = 0; i < 100; i++)
{ {
yield return new WaitForSeconds(0.001f); yield return new WaitForSeconds(0.001f);
RconcentratorSMR.SetBlendShapeWeight(0, i); RconcentratorSMR.SetBlendShapeWeight(0, i);
} }
RconcentratorSMR.gameObject.transform.DOLocalMove(new Vector3(-0.066f, 0.0611f, -0.1134f), 1f); RconcentratorSMR.gameObject.transform.DOLocalMove(new Vector3(-0.066f, 0.0611f, -0.1134f), 0.5f);
yield return new WaitForSeconds(1.5f); yield return new WaitForSeconds(1f);
StartCoroutine(PliersBack()); StartCoroutine(PliersBack());
RconcentratorSMR.gameObject.SetActive(false); RconcentratorSMR.gameObject.SetActive(false);
} }
@ -261,23 +264,23 @@ public class Pliers : MonoBehaviour
/// <returns></returns> /// <returns></returns>
IEnumerator LeftRconcentrator() IEnumerator LeftRconcentrator()
{ {
PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90, 90, 0), 1.5f); PliersObj.gameObject.transform.DOLocalRotate(new Vector3(-90, 90, 0), 0.5f);
yield return new WaitForSeconds(1.5f); yield return new WaitForSeconds(1.2f);
PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.1683f, 2.1293f, -1.5439f), 1f); PliersObj.gameObject.transform.DOLocalMove(new Vector3(3.1683f, 2.1293f, -1.5439f), 1f);
yield return new WaitForSeconds(2f); yield return new WaitForSeconds(1f);
for (int i = 100; i >= 0; i--) for (int i = 100; i >= 0; i--)
{ {
yield return new WaitForSeconds(0.01f); yield return new WaitForSeconds(0.001f);
PliersSki.SetBlendShapeWeight(0, i); PliersSki.SetBlendShapeWeight(0, i);
} }
yield return new WaitForSeconds(3f); yield return new WaitForSeconds(1f);
for (int i = 0; i < 100; i++) for (int i = 0; i < 100; i++)
{ {
yield return new WaitForSeconds(0.01f); yield return new WaitForSeconds(0.001f);
LconcentratorSMR.SetBlendShapeWeight(0, i); LconcentratorSMR.SetBlendShapeWeight(0, i);
} }
LconcentratorSMR.gameObject.transform.DOLocalMove(new Vector3(-0.0659f, 0.0829f, -0.1134f), 1f); LconcentratorSMR.gameObject.transform.DOLocalMove(new Vector3(-0.0659f, 0.0829f, -0.1134f), 0.5f);
yield return new WaitForSeconds(1.5f); yield return new WaitForSeconds(1f);
StartCoroutine(PliersBack()); StartCoroutine(PliersBack());
LconcentratorSMR.gameObject.SetActive(false); LconcentratorSMR.gameObject.SetActive(false);
} }