This commit is contained in:
陈向学 2024-08-28 13:08:12 +08:00
parent fd12821146
commit 5bf0e384c6
17 changed files with 375 additions and 90 deletions

View File

@ -108,6 +108,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 267684787124082563} - {fileID: 267684787124082563}
- {fileID: 38172639612528770}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -167,3 +168,139 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
image: {fileID: 267684787124082560} image: {fileID: 267684787124082560}
textMeshProUGUI: {fileID: 2523285510643614807}
--- !u!1 &3452568093716872615
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 38172639612528770}
- component: {fileID: 2329643047023932906}
- component: {fileID: 2523285510643614807}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &38172639612528770
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3452568093716872615}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 267684787304413251}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2329643047023932906
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3452568093716872615}
m_CullTransparentMesh: 1
--- !u!114 &2523285510643614807
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3452568093716872615}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u68C0\u67E5\u4E2D"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9ea913af302bbdf42a9f003451c70e02, type: 2}
m_sharedMaterial: {fileID: 4239875615288461448, guid: 9ea913af302bbdf42a9f003451c70e02, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}

View File

@ -14,6 +14,9 @@ public class Device_Base : PermanentTriggerBase
/// </summary> /// </summary>
public Func<string,bool,int> triggerAction; public Func<string,bool,int> triggerAction;
private Vector3 head_LocalPos;
private Vector3 head_LocalEulerAnglesl;
protected override void OnStart() protected override void OnStart()
{ {
if ( GameManager.RunModelMgr.SceneType == E_SceneType.Site) if ( GameManager.RunModelMgr.SceneType == E_SceneType.Site)
@ -44,4 +47,15 @@ public class Device_Base : PermanentTriggerBase
{ {
this.triggerAction = action; this.triggerAction = action;
} }
/// <summary>
/// 设置工具回到手中的位置
/// </summary>
/// <param name="head_LocalPos"></param>
/// <param name="head_LocalEulerAnglesl"></param>
public void SetHeadPosAndEulerang(Vector3 head_LocalPos, Vector3 head_LocalEulerAnglesl)
{
this.head_LocalPos = head_LocalPos;
this.head_LocalEulerAnglesl = head_LocalEulerAnglesl;
}
} }

View File

@ -81,10 +81,10 @@ public class Device_3Phase4WireMeter : Device_Base
cover.transform.localPosition = new Vector3(0.0001220703f, -0.1388763f, -0.2485413f); cover.transform.localPosition = new Vector3(0.0001220703f, -0.1388763f, -0.2485413f);
//左螺丝拧下 //左螺丝拧下
cover.cover_screw_Left.isInstall = false; cover.cover_screw_Left.isInstall = false;
cover.cover_screw_Left.transform.localPosition = new Vector3(cover.cover_screw_Left.transform.localPosition.x, cover.cover_screw_Left.initPostionY - 0.03f, cover.cover_screw_Left.transform.localPosition.z); cover.cover_screw_Left.transform.localPosition = new Vector3(cover.cover_screw_Left.transform.localPosition.x, -0.1840515f, -0.2512321f);
//右螺丝拧下 //右螺丝拧下
cover.cover_screw_Right.isInstall = false; cover.cover_screw_Right.isInstall = false;
cover.cover_screw_Right.transform.localPosition = new Vector3(cover.cover_screw_Right.transform.localPosition.x, cover.cover_screw_Right.initPostionY - 0.03f, cover.cover_screw_Right.transform.localPosition.z); cover.cover_screw_Right.transform.localPosition = new Vector3(cover.cover_screw_Right.transform.localPosition.x, -0.1840515f, -0.2512321f);
} }
/// <summary> /// <summary>
/// 盖子装上的状态 /// 盖子装上的状态
@ -96,10 +96,10 @@ public class Device_3Phase4WireMeter : Device_Base
cover.transform.localPosition = new Vector3(0.0001220703f, 0.01112366f, -0.09854126f); cover.transform.localPosition = new Vector3(0.0001220703f, 0.01112366f, -0.09854126f);
//左螺丝拧上 //左螺丝拧上
cover.cover_screw_Left.isInstall = true; 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_Left.transform.localPosition = new Vector3(cover.cover_screw_Left.transform.localPosition.x, -0.01405334f, -0.1012321f);
//右螺丝拧上 //右螺丝拧上
cover.cover_screw_Right.isInstall = true; 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_screw_Right.transform.localPosition = new Vector3(cover.cover_screw_Right.transform.localPosition.x, -0.01405334f, -0.1012321f);
} }
/// <summary> /// <summary>

View File

@ -55,9 +55,14 @@ public class Device_Cover : Device_Base
{ {
Debug.Log("打开盖子"); Debug.Log("打开盖子");
isOpen = true; isOpen = true;
transform.DOLocalMoveY(-0.1388763f, 2);
transform.DOLocalMoveZ(-0.2485413f, 2).OnComplete(() => Transform parent = cover_screw_Left.transform.parent;
cover_screw_Left.transform.parent = transform;
cover_screw_Right.transform.parent = transform;
transform.DOLocalMove(new Vector3(transform.localPosition.x,-0.1388763f, -0.2485413f), 2).OnComplete(() =>
{ {
cover_screw_Left.transform.parent = parent;
cover_screw_Right.transform.parent = parent;
int result = (triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true)); int result = (triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true));
}); });
} }
@ -69,9 +74,14 @@ public class Device_Cover : Device_Base
{ {
Debug.Log("盖上盖子"); Debug.Log("盖上盖子");
isOpen = false; isOpen = false;
transform.DOLocalMoveY(0.01112366f, 2);
transform.DOLocalMoveZ(-0.09854126f, 2).OnComplete(() => Transform parent = cover_screw_Left.transform.parent;
cover_screw_Left.transform.parent = transform;
cover_screw_Right.transform.parent = transform;
transform.DOLocalMove(new Vector3(transform.localPosition.x,0.01112366f, -0.09854126f), 2).OnComplete(() =>
{ {
cover_screw_Left.transform.parent = parent;
cover_screw_Right.transform.parent = parent;
int result = (triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true)); int result = (triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true));
}); });
} }

View File

@ -0,0 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ScoreBase : MonoBehaviour
{
/// <summary>
/// 科目满分
/// </summary>
protected float maxScore = 100;
/// <summary>
/// 科目得分s
/// </summary>
protected float currentScore;
/// <summary>
/// 步骤
/// </summary>
protected Dictionary<int, ScoreSubjectStep> steps;
//protected abstract void Init(ScoreSubjectStep step);
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 00415bfa520d2dd43b89c50a93350199 guid: 8dfb1c2b6f6420d47a6094d456c9ad88
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@ -4,6 +4,10 @@ using UnityEngine;
public class ScoreManager : MonoBehaviour public class ScoreManager : MonoBehaviour
{ {
List<ScoreSubject> scoreSubjectList; public static ScoreManager instance;
List<Score_1002> scoreSubjectList;
private void Awake()
{
instance = this;
}
} }

View File

@ -1,16 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ScoreSubject : MonoBehaviour
{
/// <summary>
/// 科目满分
/// </summary>
float maxScore;
/// <summary>
/// 科目得分
/// </summary>
float currentScore;
List<ScoreSubjectStep> steps;
}

View File

@ -2,7 +2,7 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class ScoreSubjectStep : MonoBehaviour public class ScoreSubjectStep
{ {
/// <summary> /// <summary>
/// 步骤满分 /// 步骤满分
@ -17,6 +17,10 @@ public class ScoreSubjectStep : MonoBehaviour
/// </summary> /// </summary>
bool isDone; bool isDone;
public ScoreSubjectStep(float maxScore)
{
this.maxScore = maxScore;
}
public void SetScore(float score) public void SetScore(float score)
{ {
isDone = true; isDone = true;

View File

@ -0,0 +1,38 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Score_1002 : ScoreBase
{
private void Init()
{
steps = new Dictionary<int, ScoreSubjectStep>();
steps.Add(3001,new ScoreSubjectStep(0));
steps.Add(3002, new ScoreSubjectStep(0));
steps.Add(3003, new ScoreSubjectStep(5));
steps.Add(3004, new ScoreSubjectStep(5));
steps.Add(3005, new ScoreSubjectStep(5));
steps.Add(3006, new ScoreSubjectStep(10));
steps.Add(3007, new ScoreSubjectStep(5));
steps.Add(3008, new ScoreSubjectStep(0));
steps.Add(3009, new ScoreSubjectStep(3));
steps.Add(3010, new ScoreSubjectStep(4));
steps.Add(3011, new ScoreSubjectStep(3));
steps.Add(3012, new ScoreSubjectStep(20));
steps.Add(3013, new ScoreSubjectStep(20));
steps.Add(3014, new ScoreSubjectStep(5));
steps.Add(3015, new ScoreSubjectStep(5));
steps.Add(3016, new ScoreSubjectStep(3));
steps.Add(3017, new ScoreSubjectStep(4));
steps.Add(3018, new ScoreSubjectStep(3));
}
/// <summary>
/// ÅзÖ
/// </summary>
public void CheckScore()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8897a2609da37744e94a004f97f53e6a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -2,6 +2,7 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using System; using System;
using DG.Tweening;
/// <summary> /// <summary>
/// 묏야꼼죕샘잚 /// 묏야꼼죕샘잚
@ -18,6 +19,9 @@ public class Tool_Base : PermanentTriggerBase
/// </summary> /// </summary>
public Func<string, bool, int> triggerAction; public Func<string, bool, int> triggerAction;
private Vector3 head_LocalPos;
private Vector3 head_LocalEulerAnglesl;
protected override void OnStart() protected override void OnStart()
{ {
if ( GameManager.RunModelMgr.SceneType == E_SceneType.Site) if ( GameManager.RunModelMgr.SceneType == E_SceneType.Site)
@ -48,4 +52,24 @@ public class Tool_Base : PermanentTriggerBase
{ {
this.triggerAction = action; this.triggerAction = action;
} }
/// <summary>
/// 设置工具回到手中的位置
/// </summary>
/// <param name="head_LocalPos"></param>
/// <param name="head_LocalEulerAnglesl"></param>
public void SetHeadPosAndEulerang(Vector3 head_LocalPos,Vector3 head_LocalEulerAnglesl)
{
this.head_LocalPos = head_LocalPos;
this.head_LocalEulerAnglesl= head_LocalEulerAnglesl;
}
/// <summary>
/// 工具回到手中
/// </summary>
public void ReBackHead()
{
transform.parent=Camera.main.transform;
transform.DOLocalMove(head_LocalPos, 1);
transform.DOLocalRotate(head_LocalEulerAnglesl, 1);
}
} }

View File

@ -67,8 +67,9 @@ public class Tool_Screw : Tool_Base
Debug.Log("开始拧紧螺丝"); Debug.Log("开始拧紧螺丝");
//设置螺丝刀初始位置 //设置螺丝刀初始位置
screwdriver.transform.parent = null; screwdriver.transform.parent = null;
screwdriver.transform.position = installPos.position; screwdriver.transform.DOLocalRotate(installPos.localEulerAngles, 0.5f);
screwdriver.transform.localEulerAngles = installPos.localEulerAngles; screwdriver.transform.DOMove(installPos.position, 1).OnComplete(() =>
{
//动画 //动画
transform.DOLocalMoveY(initPostionY, 1) transform.DOLocalMoveY(initPostionY, 1)
.OnUpdate(() => .OnUpdate(() =>
@ -83,6 +84,8 @@ public class Tool_Screw : Tool_Base
isInstall = true; isInstall = true;
isMoving = false; isMoving = false;
installAction?.Invoke(true); installAction?.Invoke(true);
ReBackHead();
});
}); });
} }
} }
@ -99,8 +102,9 @@ public class Tool_Screw : Tool_Base
Debug.Log("开始卸螺丝"); Debug.Log("开始卸螺丝");
//设置螺丝刀初始位置 //设置螺丝刀初始位置
screwdriver.transform.parent = null; screwdriver.transform.parent = null;
screwdriver.transform.position = installPos.position; screwdriver.transform.DOLocalRotate(installPos.localEulerAngles, 0.5f);
screwdriver.transform.localEulerAngles = installPos.localEulerAngles; screwdriver.transform.DOMove(installPos.position, 1).OnComplete(() =>
{
//动画 //动画
transform.DOLocalMoveY(initPostionY - 0.02f, 1) transform.DOLocalMoveY(initPostionY - 0.02f, 1)
.OnUpdate(() => .OnUpdate(() =>
@ -115,6 +119,8 @@ public class Tool_Screw : Tool_Base
isInstall = false; isInstall = false;
isMoving = false; isMoving = false;
installAction?.Invoke(false); installAction?.Invoke(false);
ReBackHead();
});
}); });
} }
} }

View File

@ -44,17 +44,35 @@ public class Tool_Screwdriver : Tool_Base
Tool_Screw ts = hit.transform.GetComponent<Tool_Screw>(); Tool_Screw ts = hit.transform.GetComponent<Tool_Screw>();
if (ts != null) if (ts != null)
{ {
if (ts.id == "电能表盖子固定螺丝1" && !SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_seal_Left.isCut) //固定螺丝操作限制
if (ts.id == "电能表盖子固定螺丝1")
{
if (!SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_seal_Left.isCut)
{ {
Debug.Log("封印未剪断"); Debug.Log("封印未剪断");
return; return;
} }
if (ts.id == "电能表盖子固定螺丝2" && !SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_seal_Right.isCut) if(SiteManager.instance.measuringCabinet.meteringDevice.cover.isOpen)
{
Debug.Log("盖子打开的");
return;
}
}
if (ts.id == "电能表盖子固定螺丝2")
{
if (!SiteManager.instance.measuringCabinet.meteringDevice.cover.cover_seal_Right.isCut)
{ {
Debug.Log("封印未剪断"); Debug.Log("封印未剪断");
return; return;
} }
if (SiteManager.instance.measuringCabinet.meteringDevice.cover.isOpen)
{
Debug.Log("盖子打开的");
return;
}
}
//接线螺丝要先点击检查接线 //接线螺丝要先点击检查接线
if (SiteManager.instance.measuringCabinet.meteringDevice.jieXian_screws.Contains(ts) && !SiteManager.instance.measuringCabinet.check_JieXian.isChecked) if (SiteManager.instance.measuringCabinet.meteringDevice.jieXian_screws.Contains(ts) && !SiteManager.instance.measuringCabinet.check_JieXian.isChecked)

View File

@ -1,3 +1,4 @@
using DG.Tweening;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Unity.VisualScripting; using Unity.VisualScripting;
@ -76,10 +77,13 @@ public class Tool_TestPen : Tool_Base
var tmp = ((Device_Socket)device_base); var tmp = ((Device_Socket)device_base);
//位置移动 //位置移动
transform.parent = null; transform.parent = null;
transform.position = tmp.testPosAndRot.position; transform.DORotate(tmp.testPosAndRot.eulerAngles, 0.5f);
transform.eulerAngles = tmp.testPosAndRot.eulerAngles; transform.DOMove(tmp.testPosAndRot.position, 1).OnComplete(() =>
{
Debug.Log("计量柜_插座 已验电"); Debug.Log("计量柜_插座 已验电");
isFlicker = tmp.hasElectricity; isFlicker = tmp.hasElectricity;
screem.materials[0].color = isFlicker ? Color.red : Color.white;
});
} }
else if (device_base.deviceType == DeviceType._柜门) else if (device_base.deviceType == DeviceType._柜门)
{ {
@ -87,13 +91,14 @@ public class Tool_TestPen : Tool_Base
//位置移动 //位置移动
transform.parent = null; transform.parent = null;
transform.position = tmp.testPosAndRot.position; transform.DOLocalRotate(tmp.testPosAndRot.localEulerAngles, 0.5f);
transform.localEulerAngles = tmp.testPosAndRot.localEulerAngles; transform.DOMove(tmp.testPosAndRot.position, 1).OnComplete(() =>
{
Debug.Log("计量柜_柜门 已验电"); Debug.Log("计量柜_柜门 已验电");
isFlicker = tmp.hasElectricity; isFlicker = tmp.hasElectricity;
}
screem.materials[0].color = isFlicker ? Color.red : Color.white; screem.materials[0].color = isFlicker ? Color.red : Color.white;
});
}
} }
} }
@ -110,13 +115,14 @@ public class Tool_TestPen : Tool_Base
var tmp = ((Tool_Screw)tool_base); var tmp = ((Tool_Screw)tool_base);
//位置移动 //位置移动
transform.parent = null; transform.parent = null;
transform.position = tmp.installPos.position; transform.DOLocalRotate(tmp.installPos.localEulerAngles, 0.5f);
transform.localEulerAngles = tmp.installPos.localEulerAngles; transform.DOMove(tmp.installPos.position, 1).OnComplete(() =>
{
Debug.Log("螺丝 已验电"); Debug.Log("螺丝 已验电");
isFlicker = tmp.hasElectricity; isFlicker = tmp.hasElectricity;
}
screem.materials[0].color = isFlicker ? Color.red : Color.white; screem.materials[0].color = isFlicker ? Color.red : Color.white;
});
}
} }
} }

View File

@ -1,3 +1,4 @@
using DG.Tweening;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -17,11 +18,13 @@ public class Tool_WireStripper : Tool_Base
{ {
isCuning = true; isCuning = true;
transform.parent = null; transform.parent = null;
transform.position = device_Seal.testPosAndRot.position; transform.DORotate(device_Seal.testPosAndRot.eulerAngles, 0.5f);
transform.eulerAngles = device_Seal.testPosAndRot.eulerAngles; transform.DOMove(device_Seal.testPosAndRot.position, 1).OnComplete(() =>
{
//播放动画 //播放动画
StopAllCoroutines(); StopAllCoroutines();
StartCoroutine(PlayAnimi(device_Seal)); StartCoroutine(PlayAnimi(device_Seal));
});
} }
/// <summary> /// <summary>
@ -49,6 +52,7 @@ public class Tool_WireStripper : Tool_Base
//剪断 //剪断
device_Seal.Cut(); device_Seal.Cut();
isCuning = false; isCuning = false;
ReBackHead();
} }
private void Update() private void Update()

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using static UnityEngine.Rendering.DebugUI; using static UnityEngine.Rendering.DebugUI;
@ -8,6 +9,7 @@ using static UnityEngine.Rendering.DebugUI;
public class ProcessTipPanel : MonoBehaviour public class ProcessTipPanel : MonoBehaviour
{ {
public Image image; public Image image;
public TextMeshProUGUI textMeshProUGUI;
/// <summary> /// <summary>
/// 是否启用进度 /// 是否启用进度
/// </summary> /// </summary>
@ -35,6 +37,7 @@ public class ProcessTipPanel : MonoBehaviour
this.isCheck=true; this.isCheck=true;
tmpback = back; tmpback = back;
Debug.Log("开始核对和抄录"); Debug.Log("开始核对和抄录");
textMeshProUGUI.text = "核对中";
} }
/// <summary> /// <summary>
@ -79,6 +82,7 @@ public class ProcessTipPanel : MonoBehaviour
private void ThisDestroy() private void ThisDestroy()
{ {
Debug.Log("核对和抄录完成!"); Debug.Log("核对和抄录完成!");
textMeshProUGUI.text = "核对完成";
tmpback(true); tmpback(true);
Destroy(gameObject); Destroy(gameObject);
} }