This commit is contained in:
陈向学 2024-08-23 11:00:30 +08:00
parent 2d5e7fbfd9
commit af1ac8bb20
5 changed files with 56 additions and 534 deletions

View File

@ -3031,7 +3031,6 @@ MonoBehaviour:
_highlight: {fileID: 0}
deviceType: 1
testPosAndRot: {fileID: 248877667}
seal: {fileID: 1647286619}
isOpen: 0
hasElectricity: 0
--- !u!114 &1462070152
@ -3534,7 +3533,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
measuringCabinet: {fileID: 1723332379}
dianCollider: {fileID: 478648694}
--- !u!1 &1638246611
GameObject:
m_ObjectHideFlags: 0
@ -3619,469 +3617,6 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &1647286615
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1647286616}
- component: {fileID: 1647286621}
- component: {fileID: 1647286620}
- component: {fileID: 1647286619}
- component: {fileID: 1647286618}
- component: {fileID: 1647286617}
- component: {fileID: 1647286622}
m_Layer: 0
m_Name: "\u5C01\u5370"
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1647286616
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1647286615}
m_LocalRotation: {x: -0, y: -0, z: -0.0028277636, w: 0.99999607}
m_LocalPosition: {x: -0.71899, y: -0.02742, z: -0.24282}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1788811152}
m_Father: {fileID: 5307496774406750061}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1647286617
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1647286615}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3}
m_Name:
m_EditorClassIdentifier:
profile: {fileID: 0}
profileSync: 0
camerasLayerMask:
serializedVersion: 2
m_Bits: 4294967295
effectGroup: 0
effectGroupLayer:
serializedVersion: 2
m_Bits: 4294967295
effectNameFilter:
combineMeshes: 0
alphaCutOff: 0
cullBackFaces: 1
ignoreObjectVisibility: 0
reflectionProbes: 0
GPUInstancing: 1
optimizeSkinnedMesh: 1
depthClip: 0
cameraDistanceFade: 0
cameraDistanceFadeNear: 0
cameraDistanceFadeFar: 1000
normalsOption: 0
ignore: 0
_highlighted: 0
fadeInDuration: 0
fadeOutDuration: 0
flipY: 0
constantWidth: 1
subMeshMask: -1
overlay: 0
overlayMode: 0
overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
overlayAnimationSpeed: 1
overlayMinIntensity: 0.5
overlayBlending: 1
overlayTexture: {fileID: 0}
overlayTextureUVSpace: 0
overlayTextureScale: 1
overlayVisibility: 0
outline: 1
outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1}
outlineColorStyle: 0
outlineGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
outlineGradientInLocalSpace: 0
outlineWidth: 0.45
outlineBlurPasses: 2
outlineQuality: 3
outlineEdgeMode: 0
outlineEdgeThreshold: 0.995
outlineDownsampling: 2
outlineVisibility: 0
glowBlendMode: 0
outlineBlitDebug: 0
outlineIndependent: 0
outlineContourStyle: 0
glow: 0.48
glowWidth: 0.4
glowQuality: 3
glowBlurMethod: 0
glowDownsampling: 2
glowHQColor: {r: 0.64, g: 1, b: 0, a: 1}
glowDithering: 1
glowMagicNumber1: 0.75
glowMagicNumber2: 0.5
glowAnimationSpeed: 1
glowVisibility: 0
glowBlitDebug: 0
glowBlendPasses: 1
glowPasses:
- offset: 4
alpha: 0.1
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 3
alpha: 0.2
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 2
alpha: 0.3
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 1
alpha: 0.4
color: {r: 0.64, g: 1, b: 0, a: 1}
glowIgnoreMask: 0
innerGlow: 0
innerGlowWidth: 1
innerGlowColor: {r: 1, g: 1, b: 1, a: 1}
innerGlowBlendMode: 0
innerGlowVisibility: 0
targetFX: 0
targetFXTexture: {fileID: 0}
targetFXColor: {r: 1, g: 1, b: 1, a: 1}
targetFXCenter: {fileID: 0}
targetFXRotationSpeed: 50
targetFXInitialScale: 4
targetFXEndScale: 1.5
targetFXScaleToRenderBounds: 1
targetFXAlignToGround: 0
targetFXFadePower: 32
targetFXGroundMaxDistance: 10
targetFXGroundLayerMask:
serializedVersion: 2
m_Bits: 4294967295
targetFXTransitionDuration: 0.5
targetFXStayDuration: 1.5
targetFXVisibility: 1
seeThrough: 2
seeThroughOccluderMask:
serializedVersion: 2
m_Bits: 4294967295
seeThroughOccluderThreshold: 0.3
seeThroughOccluderMaskAccurate: 0
seeThroughOccluderCheckInterval: 1
seeThroughOccluderCheckIndividualObjects: 0
seeThroughDepthOffset: 0
seeThroughMaxDepth: 0
seeThroughIntensity: 0.8
seeThroughTintAlpha: 0.5
seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1}
seeThroughNoise: 1
seeThroughBorder: 0
seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1}
seeThroughBorderOnly: 0
seeThroughBorderWidth: 0.45
seeThroughOrdered: 0
seeThroughTexture: {fileID: 0}
seeThroughTextureUVSpace: 0
seeThroughTextureScale: 1
rmsCount: 1
hitFxInitialIntensity: 0
hitFxMode: 0
hitFxFadeOutDuration: 0.25
hitFxColor: {r: 1, g: 1, b: 1, a: 1}
hitFxRadius: 0.5
--- !u!65 &1647286618
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1647286615}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 0.01215125, y: 0.008852867, z: 0.027755147}
m_Center: {x: 0.0000000041909516, y: -0.00000012479722, z: -0.000000058673308}
--- !u!114 &1647286619
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1647286615}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b817d2af1a955fc40bcde4e10b3d3db4, type: 3}
m_Name:
m_EditorClassIdentifier:
triggerID: 0
triggerName:
_highlight: {fileID: 0}
deviceType: 7
isCut: 0
testPosAndRot: {fileID: 1788811152}
--- !u!23 &1647286620
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1647286615}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 14b7ce7899ab5104e866597407f38385, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &1647286621
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1647286615}
m_Mesh: {fileID: -4076435291616448373, guid: 3022de55b8046f04485b93331386de5f, type: 3}
--- !u!114 &1647286622
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1647286615}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3}
m_Name:
m_EditorClassIdentifier:
profile: {fileID: 0}
profileSync: 0
camerasLayerMask:
serializedVersion: 2
m_Bits: 4294967295
effectGroup: 0
effectGroupLayer:
serializedVersion: 2
m_Bits: 4294967295
effectNameFilter:
combineMeshes: 0
alphaCutOff: 0
cullBackFaces: 1
ignoreObjectVisibility: 0
reflectionProbes: 0
GPUInstancing: 1
optimizeSkinnedMesh: 1
depthClip: 0
cameraDistanceFade: 0
cameraDistanceFadeNear: 0
cameraDistanceFadeFar: 1000
normalsOption: 0
ignore: 0
_highlighted: 0
fadeInDuration: 0
fadeOutDuration: 0
flipY: 0
constantWidth: 1
subMeshMask: -1
overlay: 0
overlayMode: 0
overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
overlayAnimationSpeed: 1
overlayMinIntensity: 0.5
overlayBlending: 1
overlayTexture: {fileID: 0}
overlayTextureUVSpace: 0
overlayTextureScale: 1
overlayVisibility: 0
outline: 1
outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1}
outlineColorStyle: 0
outlineGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
outlineGradientInLocalSpace: 0
outlineWidth: 0.45
outlineBlurPasses: 2
outlineQuality: 3
outlineEdgeMode: 0
outlineEdgeThreshold: 0.995
outlineDownsampling: 2
outlineVisibility: 0
glowBlendMode: 0
outlineBlitDebug: 0
outlineIndependent: 0
outlineContourStyle: 0
glow: 0.48
glowWidth: 0.4
glowQuality: 3
glowBlurMethod: 0
glowDownsampling: 2
glowHQColor: {r: 0.64, g: 1, b: 0, a: 1}
glowDithering: 1
glowMagicNumber1: 0.75
glowMagicNumber2: 0.5
glowAnimationSpeed: 1
glowVisibility: 0
glowBlitDebug: 0
glowBlendPasses: 1
glowPasses:
- offset: 4
alpha: 0.1
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 3
alpha: 0.2
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 2
alpha: 0.3
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 1
alpha: 0.4
color: {r: 0.64, g: 1, b: 0, a: 1}
glowIgnoreMask: 0
innerGlow: 0
innerGlowWidth: 1
innerGlowColor: {r: 1, g: 1, b: 1, a: 1}
innerGlowBlendMode: 0
innerGlowVisibility: 0
targetFX: 0
targetFXTexture: {fileID: 0}
targetFXColor: {r: 1, g: 1, b: 1, a: 1}
targetFXCenter: {fileID: 0}
targetFXRotationSpeed: 50
targetFXInitialScale: 4
targetFXEndScale: 1.5
targetFXScaleToRenderBounds: 1
targetFXAlignToGround: 0
targetFXFadePower: 32
targetFXGroundMaxDistance: 10
targetFXGroundLayerMask:
serializedVersion: 2
m_Bits: 4294967295
targetFXTransitionDuration: 0.5
targetFXStayDuration: 1.5
targetFXVisibility: 1
seeThrough: 2
seeThroughOccluderMask:
serializedVersion: 2
m_Bits: 4294967295
seeThroughOccluderThreshold: 0.3
seeThroughOccluderMaskAccurate: 0
seeThroughOccluderCheckInterval: 1
seeThroughOccluderCheckIndividualObjects: 0
seeThroughDepthOffset: 0
seeThroughMaxDepth: 0
seeThroughIntensity: 0.8
seeThroughTintAlpha: 0.5
seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1}
seeThroughNoise: 1
seeThroughBorder: 0
seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1}
seeThroughBorderOnly: 0
seeThroughBorderWidth: 0.45
seeThroughOrdered: 0
seeThroughTexture: {fileID: 0}
seeThroughTextureUVSpace: 0
seeThroughTextureScale: 1
rmsCount: 1
hitFxInitialIntensity: 0
hitFxMode: 0
hitFxFadeOutDuration: 0.25
hitFxColor: {r: 1, g: 1, b: 1, a: 1}
hitFxRadius: 0.5
--- !u!114 &1688058782 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2576541080563400545, guid: 10f4454f32eb20e4298912d896f6020e, type: 3}
@ -4122,6 +3657,7 @@ MonoBehaviour:
- {fileID: 302277748}
- {fileID: 302277752}
- {fileID: 1352022184}
dianCollider: {fileID: 0}
--- !u!114 &1760046075 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2576541080767639300, guid: 10f4454f32eb20e4298912d896f6020e, type: 3}
@ -4144,37 +3680,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1788811151
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1788811152}
m_Layer: 0
m_Name: "\u526A\u5200\u4F4D\u7F6E"
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1788811152
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1788811151}
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: -0.00168, z: 0.00241}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1647286616}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
--- !u!1 &1805837998
GameObject:
m_ObjectHideFlags: 0
@ -5677,7 +5182,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6044607018453959887, guid: 10f4454f32eb20e4298912d896f6020e, type: 3}
propertyPath: m_IsActive
value: 1
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 10f4454f32eb20e4298912d896f6020e, type: 3}
@ -6519,7 +6024,6 @@ Transform:
m_Children:
- {fileID: 3991390731618127219}
- {fileID: 248877667}
- {fileID: 1647286616}
m_Father: {fileID: 5626062447358651775}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View File

@ -8,17 +8,44 @@ using UnityEngine.EventSystems;
/// </summary>
public class Multimeter_dangwei : MonoBehaviour, IPointerClickHandler
{
public Tool_Multimeter tool_Multimeter;
/// <summary>
/// 挡位(共14档)
/// </summary>
public int dangweiValue = 0;
public void OnPointerClick(PointerEventData eventData)
{
if (eventData.button == PointerEventData.InputButton.Left)
{
tool_Multimeter.ChangeDangwei(true);
ChangeDangwei(true);
}
else if(eventData.button == PointerEventData.InputButton.Right)
{
tool_Multimeter.ChangeDangwei(false);
ChangeDangwei(false);
}
}
/// <summary>
/// 切换挡位
/// </summary>
/// <param name="isleft">是否向左转</param>
public void ChangeDangwei(bool isleft)
{
if (isleft)
{
if (dangweiValue > 0)
{
transform.RotateAroundLocal(Vector3.up, -90f / 7f);
dangweiValue--;
}
}
else
{
if (dangweiValue < 14)
{
transform.RotateAroundLocal(Vector3.up, 90f / 7f);
dangweiValue++;
}
}
}
}

View File

@ -11,6 +11,11 @@ public class Multimeter_pen : MonoBehaviour, IPointerClickHandler
{
//红或黑
public string id;
/// <summary>
/// 当前接的螺丝
/// </summary>
public Tool_Screw currentScrew;
private void Awake()
@ -39,6 +44,7 @@ public class Multimeter_pen : MonoBehaviour, IPointerClickHandler
Debug.Log("放开" + id + "笔");
//取消选中
isChose = false;
currentScrew = null;
//回到初始位置
transform.localPosition = (id=="红"? new Vector3(-0.06210404f, 0.009172082f, -0.09704163f) :new Vector3(-0.08662688f, 0.009172082f, -0.09702184f));
}
@ -56,6 +62,7 @@ public class Multimeter_pen : MonoBehaviour, IPointerClickHandler
//位置移动
transform.position = tmp.installPos.position;
transform.eulerAngles = tmp.installPos.eulerAngles;
currentScrew = tmp;
Debug.Log("万能表笔验证螺丝");
}
}

View File

@ -13,10 +13,6 @@ public class Device_CabinetDoor : Device_Base
/// </summary>
public Transform testPosAndRot;
/// <summary>
/// ·âÓ¡
/// </summary>
public Device_Seal seal;
/// <summary>
/// 是否打开
/// </summary>
public bool isOpen;
@ -53,16 +49,13 @@ public class Device_CabinetDoor : Device_Base
private void OnMouseDown()
{
if(seal.isCut)
if(isOpen)
{
if(isOpen)
{
Close();
}
else
{
Open();
}
Close();
}
else
{
Open();
}
}
}

View File

@ -8,11 +8,6 @@ using UnityEngine;
/// </summary>
public class Tool_Multimeter : Tool_Base
{
/// <summary>
/// 挡位
/// </summary>
public int dangweiValue=0;
/// <summary>
/// µ²Î»
/// </summary>
@ -20,26 +15,22 @@ public class Tool_Multimeter : Tool_Base
public Multimeter_pen pen_ÏàÏß;
public Multimeter_pen pen_ÁãÏß;
/// <summary>
/// 切换挡位
/// 鞫刻榴檄쭉서
/// </summary>
/// <param name="isleft">是否向左转</param>
public void ChangeDangwei(bool isleft)
public void CheckState()
{
if (isleft)
//든箕뎡貫
if(dangWei.dangweiValue == 2)
{
if (dangweiValue > 0)
//슥직든箕도할던든
if(pen_宮窟.currentScrew!=null && pen_宮窟.currentScrew.hasElectricity)
{
dangWei.transform.RotateAroundLocal(Vector3.up, -90f / 7f);
dangweiValue--;
}
}
else
{
if (dangweiValue < 14)
{
dangWei.transform.RotateAroundLocal(Vector3.up, 90f / 7f);
dangweiValue++;
if (pen_宮窟.currentScrew.id.Contains("in"))
{
}
}
}
}