Merge branch 'main' of http://172.16.1.12/WangWeiZhi/YanCheng_Metrology into main
This commit is contained in:
commit
69a8bf6b68
|
@ -137,6 +137,9 @@ public class StepState_1002 : StepState
|
||||||
|
|
||||||
//»¹Ô¹ñ×Ó
|
//»¹Ô¹ñ×Ó
|
||||||
SiteManager.instance.measuringCabinet.Init();
|
SiteManager.instance.measuringCabinet.Init();
|
||||||
|
|
||||||
|
//还原npc对话
|
||||||
|
GameObject.FindObjectsOfType<NPCController>().ToList().ForEach(a => { a.speackIndex = 0; });
|
||||||
}
|
}
|
||||||
else if (num == 3008)
|
else if (num == 3008)
|
||||||
{
|
{
|
||||||
|
@ -145,6 +148,9 @@ public class StepState_1002 : StepState
|
||||||
else if (num == 3009)
|
else if (num == 3009)
|
||||||
{
|
{
|
||||||
//½ÓÏß¼ì²é
|
//½ÓÏß¼ì²é
|
||||||
|
|
||||||
|
//还原npc负责人
|
||||||
|
GameObject.FindObjectsOfType<NPCController>().ToList().Find(a => a.triggerName == "NPC负责人").speackIndex = 1;
|
||||||
}
|
}
|
||||||
else if(num == 3010)
|
else if(num == 3010)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,11 +18,16 @@ public class Tool_Base : PermanentTriggerBase
|
||||||
/// trigger´¥·¢Ê¼þ
|
/// trigger´¥·¢Ê¼þ
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Func<string, bool, int> triggerAction;
|
public Func<string, bool, int> triggerAction;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否再移动
|
||||||
|
/// </summary>
|
||||||
|
public bool isMoving;
|
||||||
|
|
||||||
|
|
||||||
private Vector3 head_LocalPos;
|
private Vector3 head_LocalPos;
|
||||||
private Vector3 head_LocalEulerAnglesl;
|
private Vector3 head_LocalEulerAnglesl;
|
||||||
|
|
||||||
|
|
||||||
protected override void OnAwake()
|
protected override void OnAwake()
|
||||||
{
|
{
|
||||||
if (GameManager.RunModelMgr.SceneType == E_SceneType.Site)
|
if (GameManager.RunModelMgr.SceneType == E_SceneType.Site)
|
||||||
|
@ -77,12 +82,14 @@ public class Tool_Base : PermanentTriggerBase
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ReBackHead()
|
public void ReBackHead()
|
||||||
{
|
{
|
||||||
|
isMoving = true;
|
||||||
transform.parent = Camera.main.transform;
|
transform.parent = Camera.main.transform;
|
||||||
transform.DOLocalRotate(head_LocalEulerAnglesl, 0.5f);
|
transform.DOLocalRotate(head_LocalEulerAnglesl, 0.3f);
|
||||||
transform.DOLocalMove(head_LocalPos, 1).OnComplete(() =>
|
transform.DOLocalMove(head_LocalPos, 0.8f).OnComplete(() =>
|
||||||
{
|
{
|
||||||
transform.localPosition = head_LocalPos;
|
transform.localPosition = head_LocalPos;
|
||||||
transform.localEulerAngles = head_LocalEulerAnglesl;
|
transform.localEulerAngles = head_LocalEulerAnglesl;
|
||||||
|
isMoving = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class Tool_Screw : Tool_Base
|
||||||
isMoving = false;
|
isMoving = false;
|
||||||
installAction?.Invoke(true);
|
installAction?.Invoke(true);
|
||||||
screwdriver.ReBackHead();
|
screwdriver.ReBackHead();
|
||||||
screwdriver.isUseing = false;
|
screwdriver.isMoving = false;
|
||||||
CallScoreAction(true);
|
CallScoreAction(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -122,7 +122,7 @@ public class Tool_Screw : Tool_Base
|
||||||
isMoving = false;
|
isMoving = false;
|
||||||
installAction?.Invoke(false);
|
installAction?.Invoke(false);
|
||||||
screwdriver.ReBackHead();
|
screwdriver.ReBackHead();
|
||||||
screwdriver.isUseing = false;
|
screwdriver.isMoving = false;
|
||||||
CallScoreAction(false);
|
CallScoreAction(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,12 +8,6 @@ using UnityEngine;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Tool_Screwdriver : Tool_Base
|
public class Tool_Screwdriver : Tool_Base
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 正在使用
|
|
||||||
/// </summary>
|
|
||||||
[HideInInspector]
|
|
||||||
public bool isUseing;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 开始安装螺丝
|
/// 开始安装螺丝
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -22,7 +16,7 @@ public class Tool_Screwdriver : Tool_Base
|
||||||
{
|
{
|
||||||
if (!screw.isInstall)
|
if (!screw.isInstall)
|
||||||
{
|
{
|
||||||
isUseing = true;
|
isMoving = true;
|
||||||
screw.BeInstalled(this);
|
screw.BeInstalled(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,14 +29,14 @@ public class Tool_Screwdriver : Tool_Base
|
||||||
{
|
{
|
||||||
if (screw.isInstall)
|
if (screw.isInstall)
|
||||||
{
|
{
|
||||||
isUseing = true;
|
isMoving = true;
|
||||||
screw.BeUnInstalled(this);
|
screw.BeUnInstalled(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (Input.GetMouseButtonDown(0) && !isUseing)
|
if (Input.GetMouseButtonDown(0) && !base.isMoving)
|
||||||
{
|
{
|
||||||
//点击螺丝验电
|
//点击螺丝验电
|
||||||
Ray tmpray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
Ray tmpray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
using DG.Tweening;
|
using DG.Tweening;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Unity.VisualScripting;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -9,14 +9,13 @@ using static Unity.Burst.Intrinsics.X86.Avx;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Tool_WireStripper : Tool_Base
|
public class Tool_WireStripper : Tool_Base
|
||||||
{
|
{
|
||||||
private bool isCuning;
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 开始剪封印
|
/// 开始剪封印
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="device_Seal"></param>
|
/// <param name="device_Seal"></param>
|
||||||
public void CutOpen(Device_Seal device_Seal)
|
public void CutOpen(Device_Seal device_Seal)
|
||||||
{
|
{
|
||||||
isCuning = true;
|
isMoving = true;
|
||||||
transform.parent = null;
|
transform.parent = null;
|
||||||
transform.DORotate(device_Seal.testPosAndRot.eulerAngles, 0.5f);
|
transform.DORotate(device_Seal.testPosAndRot.eulerAngles, 0.5f);
|
||||||
transform.DOMove(device_Seal.testPosAndRot.position, 1).OnComplete(() =>
|
transform.DOMove(device_Seal.testPosAndRot.position, 1).OnComplete(() =>
|
||||||
|
@ -51,14 +50,14 @@ public class Tool_WireStripper : Tool_Base
|
||||||
}
|
}
|
||||||
//剪断
|
//剪断
|
||||||
device_Seal.Cut();
|
device_Seal.Cut();
|
||||||
isCuning = false;
|
isMoving = false;
|
||||||
ReBackHead();
|
ReBackHead();
|
||||||
int result = (triggerAction == null ? 0 : triggerAction.Invoke(device_Seal.triggerName, true));
|
int result = (triggerAction == null ? 0 : triggerAction.Invoke(device_Seal.triggerName, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (Input.GetMouseButtonDown(0) && !isCuning)
|
if (Input.GetMouseButtonDown(0) && !isMoving)
|
||||||
{
|
{
|
||||||
//点击螺丝验电
|
//点击螺丝验电
|
||||||
Ray tmpray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
Ray tmpray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||||
|
|
Loading…
Reference in New Issue