Compare commits
2 Commits
528ab457b3
...
eaffd074c1
| Author | SHA1 | Date |
|---|---|---|
|
|
eaffd074c1 | |
|
|
92c9ff8cba |
|
|
@ -9,15 +9,18 @@ Material:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_Name: "\u73BB\u7483"
|
m_Name: "\u73BB\u7483"
|
||||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||||
m_ValidKeywords: []
|
m_ValidKeywords:
|
||||||
|
- _SURFACE_TYPE_TRANSPARENT
|
||||||
m_InvalidKeywords: []
|
m_InvalidKeywords: []
|
||||||
m_LightmapFlags: 4
|
m_LightmapFlags: 4
|
||||||
m_EnableInstancingVariants: 0
|
m_EnableInstancingVariants: 0
|
||||||
m_DoubleSidedGI: 0
|
m_DoubleSidedGI: 0
|
||||||
m_CustomRenderQueue: 2000
|
m_CustomRenderQueue: 3000
|
||||||
stringTagMap:
|
stringTagMap:
|
||||||
RenderType: Opaque
|
RenderType: Transparent
|
||||||
disabledShaderPasses: []
|
disabledShaderPasses:
|
||||||
|
- DepthOnly
|
||||||
|
- SHADOWCASTER
|
||||||
m_SavedProperties:
|
m_SavedProperties:
|
||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TexEnvs:
|
m_TexEnvs:
|
||||||
|
|
@ -88,7 +91,7 @@ Material:
|
||||||
- _Cutoff: 0.5
|
- _Cutoff: 0.5
|
||||||
- _DetailAlbedoMapScale: 1
|
- _DetailAlbedoMapScale: 1
|
||||||
- _DetailNormalMapScale: 1
|
- _DetailNormalMapScale: 1
|
||||||
- _DstBlend: 0
|
- _DstBlend: 10
|
||||||
- _EnvironmentReflections: 1
|
- _EnvironmentReflections: 1
|
||||||
- _GlossMapScale: 0
|
- _GlossMapScale: 0
|
||||||
- _Glossiness: 0
|
- _Glossiness: 0
|
||||||
|
|
@ -101,10 +104,10 @@ Material:
|
||||||
- _Smoothness: 0.5
|
- _Smoothness: 0.5
|
||||||
- _SmoothnessTextureChannel: 0
|
- _SmoothnessTextureChannel: 0
|
||||||
- _SpecularHighlights: 1
|
- _SpecularHighlights: 1
|
||||||
- _SrcBlend: 1
|
- _SrcBlend: 5
|
||||||
- _Surface: 0
|
- _Surface: 1
|
||||||
- _WorkflowMode: 1
|
- _WorkflowMode: 1
|
||||||
- _ZWrite: 1
|
- _ZWrite: 0
|
||||||
m_Colors:
|
m_Colors:
|
||||||
- _BaseColor: {r: 0, g: 0, b: 0, a: 0.47215682}
|
- _BaseColor: {r: 0, g: 0, b: 0, a: 0.47215682}
|
||||||
- _Color: {r: 0, g: 0, b: 0, a: 0.47215682}
|
- _Color: {r: 0, g: 0, b: 0, a: 0.47215682}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ GameObject:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1965530637903639590}
|
- component: {fileID: 1965530637903639590}
|
||||||
|
- component: {fileID: 1979776030034460225}
|
||||||
|
- component: {fileID: 2925187013327622802}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: "\u7EA2\u7B14"
|
m_Name: "\u7EA2\u7B14"
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
|
@ -32,6 +34,32 @@ Transform:
|
||||||
m_Father: {fileID: 5376839146013080726}
|
m_Father: {fileID: 5376839146013080726}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &1979776030034460225
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2017067868099458191}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 52d1e3794f9e3724ab7d370707c165e9, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
id: "\u7EA2"
|
||||||
|
--- !u!65 &2925187013327622802
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2017067868099458191}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 0.012164328, y: 0.17317626, z: 0.011568989}
|
||||||
|
m_Center: {x: -0.0000000093132275, y: -0.075, z: 0.00000000651926}
|
||||||
--- !u!1 &3442245682270072348
|
--- !u!1 &3442245682270072348
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -319,6 +347,8 @@ GameObject:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 3466125173440610008}
|
- component: {fileID: 3466125173440610008}
|
||||||
|
- component: {fileID: 8389596032923302982}
|
||||||
|
- component: {fileID: 6526392614341423659}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: "\u9ED1\u7B14"
|
m_Name: "\u9ED1\u7B14"
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
|
@ -342,6 +372,32 @@ Transform:
|
||||||
m_Father: {fileID: 5376839146013080726}
|
m_Father: {fileID: 5376839146013080726}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &8389596032923302982
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5597706746217307991}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 52d1e3794f9e3724ab7d370707c165e9, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
id: "\u9ED1"
|
||||||
|
--- !u!65 &6526392614341423659
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5597706746217307991}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 0.012164328, y: 0.17317626, z: 0.011568989}
|
||||||
|
m_Center: {x: -0.0000000093132275, y: -0.075, z: 0.00000000651926}
|
||||||
--- !u!1 &5681162065009577494
|
--- !u!1 &5681162065009577494
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -332,6 +332,14 @@ PrefabInstance:
|
||||||
propertyPath: m_AABB.m_Extent.z
|
propertyPath: m_AABB.m_Extent.z
|
||||||
value: 7.0822697
|
value: 7.0822697
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -3887185075125053422, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
|
||||||
|
propertyPath: m_BlendShapeWeights.Array.size
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -3887185075125053422, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
|
||||||
|
propertyPath: m_BlendShapeWeights.Array.data[0]
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 919132149155446097, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
|
- target: {fileID: 919132149155446097, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: "\u5265\u7EBF\u94B3 (1)"
|
value: "\u5265\u7EBF\u94B3 (1)"
|
||||||
|
|
|
||||||
|
|
@ -504,6 +504,7 @@ MonoBehaviour:
|
||||||
triggerID: 0
|
triggerID: 0
|
||||||
toolName:
|
toolName:
|
||||||
toolOrDeviceOrMaterial: 0
|
toolOrDeviceOrMaterial: 0
|
||||||
|
selfObj: {fileID: 0}
|
||||||
_highlight: {fileID: 0}
|
_highlight: {fileID: 0}
|
||||||
--- !u!65 &3014182739139812810
|
--- !u!65 &3014182739139812810
|
||||||
BoxCollider:
|
BoxCollider:
|
||||||
|
|
|
||||||
|
|
@ -345,6 +345,7 @@ GameObject:
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 254869080}
|
- component: {fileID: 254869080}
|
||||||
- component: {fileID: 254869081}
|
- component: {fileID: 254869081}
|
||||||
|
- component: {fileID: 254869082}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: 3001
|
m_Name: 3001
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
|
@ -385,6 +386,18 @@ MonoBehaviour:
|
||||||
schemeId: 0
|
schemeId: 0
|
||||||
subProcessId: 0
|
subProcessId: 0
|
||||||
stepStateBases: []
|
stepStateBases: []
|
||||||
|
--- !u!114 &254869082
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 254869079}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: efc96f6a32601eb468d03debfd8d9661, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
--- !u!1 &291527140
|
--- !u!1 &291527140
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -639,6 +652,7 @@ GameObject:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 552229449}
|
- component: {fileID: 552229449}
|
||||||
|
- component: {fileID: 552229450}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: 1002
|
m_Name: 1002
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
|
@ -679,6 +693,18 @@ Transform:
|
||||||
m_Father: {fileID: 559582437}
|
m_Father: {fileID: 559582437}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &552229450
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 552229448}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 00415bfa520d2dd43b89c50a93350199, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
--- !u!1 &559582436
|
--- !u!1 &559582436
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -1667,6 +1693,7 @@ GameObject:
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1782595005}
|
- component: {fileID: 1782595005}
|
||||||
- component: {fileID: 1782595004}
|
- component: {fileID: 1782595004}
|
||||||
|
- component: {fileID: 1782595006}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: "\u6B65\u9AA4\u72B6\u6001"
|
m_Name: "\u6B65\u9AA4\u72B6\u6001"
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
|
@ -1702,6 +1729,18 @@ Transform:
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 4
|
m_RootOrder: 4
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &1782595006
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1782595003}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 728973cb69f5b2d4b9a1ef0a634de34b, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
--- !u!1 &2058314690
|
--- !u!1 &2058314690
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -11,4 +11,17 @@ public class Device_Seal : Device_Base
|
||||||
/// 是否被剪开
|
/// 是否被剪开
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool isCut;
|
public bool isCut;
|
||||||
|
/// <summary>
|
||||||
|
/// 被剪的位置
|
||||||
|
/// </summary>
|
||||||
|
public Transform testPosAndRot;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 剪开封印
|
||||||
|
/// </summary>
|
||||||
|
public void Cut()
|
||||||
|
{
|
||||||
|
isCut = true;
|
||||||
|
gameObject.SetActive(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f3fccb608fecd9e4a96ce0cfec08553f
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -3,6 +3,9 @@ using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 万用表挡位
|
||||||
|
/// </summary>
|
||||||
public class Multimeter_dangwei : MonoBehaviour, IPointerClickHandler
|
public class Multimeter_dangwei : MonoBehaviour, IPointerClickHandler
|
||||||
{
|
{
|
||||||
public Tool_Multimeter tool_Multimeter;
|
public Tool_Multimeter tool_Multimeter;
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Unity.VisualScripting;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.EventSystems;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 万用表笔
|
||||||
|
/// </summary>
|
||||||
|
public class Multimeter_pen : MonoBehaviour, IPointerClickHandler
|
||||||
|
{
|
||||||
|
//红或黑
|
||||||
|
public string id;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否已选择
|
||||||
|
/// </summary>
|
||||||
|
private bool isChose;
|
||||||
|
|
||||||
|
public void OnPointerClick(PointerEventData eventData)
|
||||||
|
{
|
||||||
|
if(eventData.button== PointerEventData.InputButton.Left)
|
||||||
|
{
|
||||||
|
Debug.Log("选中"+ id+"笔");
|
||||||
|
//选中
|
||||||
|
isChose = true;
|
||||||
|
}
|
||||||
|
else if(eventData.button == PointerEventData.InputButton.Right)
|
||||||
|
{
|
||||||
|
Debug.Log("放开" + id + "笔");
|
||||||
|
//取消选中
|
||||||
|
isChose = false;
|
||||||
|
//回到初始位置
|
||||||
|
transform.localPosition = (id=="红"? new Vector3(-0.06210404f, 0.009172082f, -0.09704163f) :new Vector3(-0.08662688f, 0.009172082f, -0.09702184f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 执行验电操作
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="tool_base">被验电设备</param>
|
||||||
|
public void Test(Tool_Base tool_base)
|
||||||
|
{
|
||||||
|
if (tool_base.toolType == ToolType.螺丝)
|
||||||
|
{
|
||||||
|
var tmp = ((Tool_Screw)tool_base);
|
||||||
|
//位置移动
|
||||||
|
transform.position = tmp.installPos.position;
|
||||||
|
transform.eulerAngles = tmp.installPos.eulerAngles;
|
||||||
|
Debug.Log("万能表笔验证螺丝");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (isChose)
|
||||||
|
{
|
||||||
|
transform.position = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
||||||
|
if(Input.GetMouseButtonDown(0))
|
||||||
|
{
|
||||||
|
//点击螺丝验电
|
||||||
|
Ray tmpray=Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||||
|
if (Physics.Raycast(tmpray,out RaycastHit hit))
|
||||||
|
{
|
||||||
|
Tool_Screw screw= hit.transform.GetComponent<Tool_Screw>();
|
||||||
|
if(screw!=null)
|
||||||
|
{
|
||||||
|
Test(screw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: ad21af12e5592364998f119df90e1a2e
|
guid: 52d1e3794f9e3724ab7d370707c165e9
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
using DG.Tweening;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Unity.VisualScripting.Antlr3.Runtime;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接线盖子
|
||||||
|
/// </summary>
|
||||||
|
public class Device_Cover : Device_Base
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 盖子是否已打开
|
||||||
|
/// </summary>
|
||||||
|
public bool isOpen;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否检查接线完好
|
||||||
|
/// </summary>
|
||||||
|
public bool isCheckOK;
|
||||||
|
|
||||||
|
private void OnMouseDown()
|
||||||
|
{
|
||||||
|
Debug.Log("接线完好");
|
||||||
|
isCheckOK = true;
|
||||||
|
|
||||||
|
if(!isOpen)
|
||||||
|
{
|
||||||
|
Device_DirectAccessElectricEnergyMeteringDevice deemd= transform.parent.GetComponent<Device_DirectAccessElectricEnergyMeteringDevice>();
|
||||||
|
if (!deemd.cover_screw_Left.isInstall && !deemd.cover_screw_Right.isInstall)
|
||||||
|
{
|
||||||
|
Open();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(isOpen)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 打开盖子
|
||||||
|
/// </summary>
|
||||||
|
public void Open()
|
||||||
|
{
|
||||||
|
Debug.Log("打开盖子");
|
||||||
|
isOpen = true;
|
||||||
|
transform.DOLocalMoveZ(transform.localPosition.z - 0.15f, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 盖上盖子
|
||||||
|
/// </summary>
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
Debug.Log("盖上盖子");
|
||||||
|
isOpen = false;
|
||||||
|
transform.DOLocalMoveZ(transform.localPosition.z + 0.15f, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6c33992bdd7946a45a5c38ce1a776e9b
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -7,18 +7,26 @@ using UnityEngine;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Device_DirectAccessElectricEnergyMeteringDevice : Device_Base
|
public class Device_DirectAccessElectricEnergyMeteringDevice : Device_Base
|
||||||
{
|
{
|
||||||
|
public static Device_DirectAccessElectricEnergyMeteringDevice instance;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 铭牌
|
/// 铭牌
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Device_NamePlate namePlate;
|
public Device_NamePlate namePlate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 合格标志
|
/// ½ÓÏ߸Ç×Ó
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Device_MarkOfConformity conformity;
|
public Device_Cover cover;
|
||||||
/// <summary>
|
|
||||||
/// 电能表盖子固定螺丝
|
[Tooltip("×ó¸Ç×ÓÂÝË¿")]
|
||||||
/// </summary>
|
public Tool_Screw cover_screw_Left;
|
||||||
public List<Tool_Screw> cover_screws;
|
[Tooltip("ÓÒ¸Ç×ÓÂÝË¿")]
|
||||||
|
public Tool_Screw cover_screw_Right;
|
||||||
|
[Tooltip("×ó¸Ç×Ó·âÓ¡")]
|
||||||
|
public Device_Seal cover_seal_Left;
|
||||||
|
[Tooltip("ÓÒ¸Ç×Ó·âÓ¡")]
|
||||||
|
public Device_Seal cover_seal_Right;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 电能表接线螺丝
|
/// 电能表接线螺丝
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -31,5 +39,10 @@ public class Device_DirectAccessElectricEnergyMeteringDevice : Device_Base
|
||||||
/// 电能表固定螺丝
|
/// 电能表固定螺丝
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<Tool_Screw> fix_screws;
|
public List<Tool_Screw> fix_screws;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
instance = this;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 直接接入式电能计量装置_合格标志
|
|
||||||
/// </summary>
|
|
||||||
public class Device_MarkOfConformity : Device_Base
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
@ -10,34 +10,40 @@ public class Device_NamePlate : Device_Base
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否检查
|
/// 是否检查
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool isCheck;
|
public bool isChecked;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 核对和抄录UI
|
/// 核对和抄录UI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GameObject checkUiPrefb;
|
private GameObject checkUiPrefb;
|
||||||
public ProcessTipPanel processTipPanel;
|
private ProcessTipPanel processTipPanel;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// ºË¶ÔºÍ¼Ç¼
|
|
||||||
/// </summary>
|
|
||||||
public void Check()
|
|
||||||
{
|
|
||||||
if(checkUiPrefb==null)
|
|
||||||
{
|
|
||||||
checkUiPrefb = Resources.Load<GameObject>("UI/UI_Tip/ProcessTipPanel");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(processTipPanel==null)
|
|
||||||
{
|
|
||||||
GameObject tip = Instantiate<GameObject>(checkUiPrefb, UIManager.Instance.canvas.transform);
|
|
||||||
processTipPanel = tip.GetComponent<ProcessTipPanel>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnMouseDown()
|
private void OnMouseDown()
|
||||||
{
|
{
|
||||||
processTipPanel.SetProcess(true);
|
if (!isChecked)
|
||||||
|
{
|
||||||
|
//核对和记录
|
||||||
|
if (checkUiPrefb == null)
|
||||||
|
{
|
||||||
|
checkUiPrefb = Resources.Load<GameObject>("UI/UI_Tip/ProcessTipPanel");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (processTipPanel == null)
|
||||||
|
{
|
||||||
|
GameObject tip = Instantiate<GameObject>(checkUiPrefb, UIManager.Instance.canvas.transform);
|
||||||
|
processTipPanel = tip.GetComponent<ProcessTipPanel>();
|
||||||
|
}
|
||||||
|
|
||||||
|
//开始走进度
|
||||||
|
processTipPanel.StartProcess(result =>
|
||||||
|
{
|
||||||
|
if(result)
|
||||||
|
{
|
||||||
|
Debug.Log("核查完成");
|
||||||
|
isChecked = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -11,6 +12,42 @@ public class Device_CabinetDoor : Device_Base
|
||||||
/// ÑéµçλÖÃ
|
/// ÑéµçλÖÃ
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Transform testPosAndRot;
|
public Transform testPosAndRot;
|
||||||
|
/// <summary>
|
||||||
|
/// ·âÓ¡
|
||||||
|
/// </summary>
|
||||||
|
public Device_Seal seal;
|
||||||
|
|
||||||
public bool isOpen;
|
public bool isOpen;
|
||||||
|
|
||||||
|
public void Open()
|
||||||
|
{
|
||||||
|
Debug.Log("¿ªÃÅ");
|
||||||
|
transform.DOLocalRotate(new Vector3(0,0,180), 3).OnComplete(() =>
|
||||||
|
{
|
||||||
|
isOpen = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
Debug.Log("¹ØÃÅ");
|
||||||
|
transform.DOLocalRotate(new Vector3(0,0,0), 3).OnComplete(() =>
|
||||||
|
{
|
||||||
|
isOpen = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnMouseDown()
|
||||||
|
{
|
||||||
|
if(seal.isCut)
|
||||||
|
{
|
||||||
|
if(isOpen)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Open();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3c8b8a318ec4ab540aaf5c566b5d9de5
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class ScoreManager : MonoBehaviour
|
||||||
|
{
|
||||||
|
List<ScoreSubject> scoreSubjectList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 728973cb69f5b2d4b9a1ef0a634de34b
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class ScoreSubject : MonoBehaviour
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 科目满分
|
||||||
|
/// </summary>
|
||||||
|
float maxScore;
|
||||||
|
/// <summary>
|
||||||
|
/// 科目得分
|
||||||
|
/// </summary>
|
||||||
|
float currentScore;
|
||||||
|
List<ScoreSubjectStep> steps;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 00415bfa520d2dd43b89c50a93350199
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class ScoreSubjectStep : MonoBehaviour
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 步骤满分
|
||||||
|
/// </summary>
|
||||||
|
float maxScore;
|
||||||
|
/// <summary>
|
||||||
|
/// 步骤得分
|
||||||
|
/// </summary>
|
||||||
|
float currentScore;
|
||||||
|
/// <summary>
|
||||||
|
/// 步骤是否已完成
|
||||||
|
/// </summary>
|
||||||
|
bool isDone;
|
||||||
|
|
||||||
|
public void SetScore(float score)
|
||||||
|
{
|
||||||
|
isDone = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: efc96f6a32601eb468d03debfd8d9661
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 20509a9c360dbfa448a36ca6eeaf639d
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -22,6 +22,7 @@ public class Tool_Screw : Tool_Base
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Transform installPos;
|
public Transform installPos;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 螺丝拧紧时的位置
|
/// 螺丝拧紧时的位置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -32,6 +33,7 @@ public class Tool_Screw : Tool_Base
|
||||||
private float localYUnInstallValue;
|
private float localYUnInstallValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 被拧紧
|
/// 被拧紧
|
||||||
|
|
@ -42,7 +44,7 @@ public class Tool_Screw : Tool_Base
|
||||||
//设置螺丝刀初始位置
|
//设置螺丝刀初始位置
|
||||||
screwdriver.transform.position = installPos.position;
|
screwdriver.transform.position = installPos.position;
|
||||||
//动画
|
//动画
|
||||||
transform.DOLocalMoveY(localYInstallValue, 1)
|
transform.DOLocalMoveY(transform.localPosition.y+0.02f, 1)
|
||||||
.OnUpdate(() =>
|
.OnUpdate(() =>
|
||||||
{
|
{
|
||||||
transform.RotateAroundLocal(Vector3.up, 1);
|
transform.RotateAroundLocal(Vector3.up, 1);
|
||||||
|
|
@ -56,7 +58,7 @@ public class Tool_Screw : Tool_Base
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ±»Å¡ËÍ
|
/// ±»Å¡ËÉ
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="screwdriver"></param>
|
/// <param name="screwdriver"></param>
|
||||||
public void BeUnInstalled(Tool_Screwdriver screwdriver)
|
public void BeUnInstalled(Tool_Screwdriver screwdriver)
|
||||||
|
|
@ -64,7 +66,7 @@ public class Tool_Screw : Tool_Base
|
||||||
//设置螺丝刀初始位置
|
//设置螺丝刀初始位置
|
||||||
screwdriver.transform.position = installPos.position;
|
screwdriver.transform.position = installPos.position;
|
||||||
//动画
|
//动画
|
||||||
transform.DOLocalMoveY(localYUnInstallValue, 1)
|
transform.DOLocalMoveY(transform.localPosition.y - 0.02f, 1)
|
||||||
.OnUpdate(() =>
|
.OnUpdate(() =>
|
||||||
{
|
{
|
||||||
transform.RotateAroundLocal(Vector3.up, 1);
|
transform.RotateAroundLocal(Vector3.up, 1);
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,47 @@ public class Tool_Screwdriver : Tool_Base
|
||||||
/// <param name="screw"></param>
|
/// <param name="screw"></param>
|
||||||
public void UnInstall(Tool_Screw screw)
|
public void UnInstall(Tool_Screw screw)
|
||||||
{
|
{
|
||||||
if (screw.isInstall)
|
if (screw.isInstall )
|
||||||
{
|
{
|
||||||
Debug.Log("¿ªÊ¼Ð¶ÂÝË¿");
|
Debug.Log("¿ªÊ¼Ð¶ÂÝË¿");
|
||||||
screw.BeUnInstalled(this);
|
screw.BeUnInstalled(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (Input.GetMouseButtonDown(0))
|
||||||
|
{
|
||||||
|
//点击螺丝验电
|
||||||
|
Ray tmpray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||||
|
if (Physics.Raycast(tmpray, out RaycastHit hit))
|
||||||
|
{
|
||||||
|
//插座
|
||||||
|
Tool_Screw ts = hit.transform.GetComponent<Tool_Screw>();
|
||||||
|
if (ts != null)
|
||||||
|
{
|
||||||
|
if(ts.id== "电能表盖子固定螺丝1" && !Device_DirectAccessElectricEnergyMeteringDevice.instance.cover_seal_Left.isCut)
|
||||||
|
{
|
||||||
|
Debug.Log("封印未剪断");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ts.id == "电能表盖子固定螺丝2" && !Device_DirectAccessElectricEnergyMeteringDevice.instance.cover_seal_Right.isCut)
|
||||||
|
{
|
||||||
|
Debug.Log("封印未剪断");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ts.isInstall)
|
||||||
|
{
|
||||||
|
UnInstall(ts);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Install(ts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,33 @@ using UnityEngine;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Tool_TestPen : Tool_Base
|
public class Tool_TestPen : Tool_Base
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (Input.GetMouseButtonDown(0))
|
||||||
|
{
|
||||||
|
//µã»÷ÂÝË¿Ñéµç
|
||||||
|
Ray tmpray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||||
|
if (Physics.Raycast(tmpray, out RaycastHit hit))
|
||||||
|
{
|
||||||
|
//²å×ù
|
||||||
|
Device_Base db = hit.transform.GetComponent<Device_Base>();
|
||||||
|
if (db != null)
|
||||||
|
{
|
||||||
|
Test(db);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//¹ñÃÅ
|
||||||
|
Tool_Base tb= hit.transform.GetComponent<Tool_Base>();
|
||||||
|
if(tb != null)
|
||||||
|
{
|
||||||
|
Test(tb);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 执行验电操作
|
/// 执行验电操作
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using static Unity.Burst.Intrinsics.X86.Avx;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// °þÏßǯ
|
/// °þÏßǯ
|
||||||
|
|
@ -8,12 +9,59 @@ using UnityEngine;
|
||||||
public class Tool_WireStripper : Tool_Base
|
public class Tool_WireStripper : Tool_Base
|
||||||
{
|
{
|
||||||
/// <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)
|
||||||
{
|
{
|
||||||
device_Seal.isCut = true;
|
transform.position = device_Seal.testPosAndRot.position;
|
||||||
device_Seal.gameObject.SetActive(false);
|
transform.eulerAngles = device_Seal.testPosAndRot.eulerAngles;
|
||||||
|
//播放动画
|
||||||
|
StopAllCoroutines();
|
||||||
|
StartCoroutine(PlayAnimi(device_Seal));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 剪的动画
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
IEnumerator PlayAnimi(Device_Seal device_Seal)
|
||||||
|
{
|
||||||
|
SkinnedMeshRenderer renderer= GetComponentInChildren<SkinnedMeshRenderer>();
|
||||||
|
float vlaue = 0;
|
||||||
|
//打开
|
||||||
|
while (renderer.GetBlendShapeWeight(0) < 100)
|
||||||
|
{
|
||||||
|
vlaue += (Time.deltaTime * 50);
|
||||||
|
renderer.SetBlendShapeWeight(0, vlaue);
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
//关闭
|
||||||
|
while (renderer.GetBlendShapeWeight(0) > 0)
|
||||||
|
{
|
||||||
|
vlaue -= (Time.deltaTime * 50);
|
||||||
|
renderer.SetBlendShapeWeight(0, vlaue);
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
//剪断
|
||||||
|
device_Seal.Cut();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (Input.GetMouseButtonDown(0))
|
||||||
|
{
|
||||||
|
//点击螺丝验电
|
||||||
|
Ray tmpray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||||
|
if (Physics.Raycast(tmpray, out RaycastHit hit))
|
||||||
|
{
|
||||||
|
//封印
|
||||||
|
Device_Seal ds = hit.transform.GetComponent<Device_Seal>();
|
||||||
|
if (ds != null)
|
||||||
|
{
|
||||||
|
CutOpen(ds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
@ -20,32 +21,41 @@ public class ProcessTipPanel : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private bool isOver=false;
|
private bool isOver=false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 结果回调
|
||||||
|
/// </summary>
|
||||||
|
private Action<bool> tmpback;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置进度
|
/// 开始走进度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value"></param>
|
/// <param name="back"></param>
|
||||||
public void SetProcess(bool ischeck)
|
public void StartProcess(Action<bool> back)
|
||||||
{
|
{
|
||||||
this.isCheck = ischeck;
|
this.isCheck=true;
|
||||||
if(!ischeck )
|
tmpback = back;
|
||||||
{
|
Debug.Log("开始核对和抄录");
|
||||||
currentProcess = 0;
|
|
||||||
image.fillAmount = currentProcess;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("开始核对和抄录");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 中止走进度
|
||||||
|
/// </summary>
|
||||||
|
public void StopProcess()
|
||||||
|
{
|
||||||
|
this.isCheck = false;
|
||||||
|
currentProcess = 0;
|
||||||
|
image.fillAmount = currentProcess;
|
||||||
|
tmpback(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
if (!isOver)
|
if (!isOver)
|
||||||
{
|
{
|
||||||
if (isCheck)
|
if (isCheck)
|
||||||
{
|
{
|
||||||
currentProcess = Mathf.Clamp01(currentProcess + Time.deltaTime * 0.1f);
|
currentProcess = Mathf.Clamp01(currentProcess + Time.deltaTime * 0.3f);
|
||||||
image.fillAmount = currentProcess;
|
image.fillAmount = currentProcess;
|
||||||
if (currentProcess == 1)
|
if (currentProcess == 1)
|
||||||
{
|
{
|
||||||
|
|
@ -56,7 +66,7 @@ public class ProcessTipPanel : MonoBehaviour
|
||||||
|
|
||||||
if (Input.GetMouseButtonUp(0))
|
if (Input.GetMouseButtonUp(0))
|
||||||
{
|
{
|
||||||
SetProcess(false);
|
StopProcess();
|
||||||
isOver = true;
|
isOver = true;
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
|
|
@ -69,6 +79,7 @@ public class ProcessTipPanel : MonoBehaviour
|
||||||
private void ThisDestroy()
|
private void ThisDestroy()
|
||||||
{
|
{
|
||||||
Debug.Log("ºË¶ÔºÍ³Â¼Íê³É£¡");
|
Debug.Log("ºË¶ÔºÍ³Â¼Íê³É£¡");
|
||||||
|
tmpback(true);
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -196,8 +196,9 @@ public enum DeviceType
|
||||||
计量柜,
|
计量柜,
|
||||||
计量柜_柜门,
|
计量柜_柜门,
|
||||||
计量柜_插座,
|
计量柜_插座,
|
||||||
直接接入式电能计量装置,
|
三相四线电表,
|
||||||
直接接入式电能计量装置_开关,
|
三相四线电表_开关,
|
||||||
直接接入式电能计量装置_铭牌,
|
三相四线电表_铭牌,
|
||||||
直接接入式电能计量装置_合格标志,
|
三相四线电表_接线盖子,
|
||||||
|
封印
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue