From bd59df4cd457cdef4ba4435657fd28781a8f2e84 Mon Sep 17 00:00:00 2001 From: huqibin <762612145@qq.com> Date: Wed, 21 May 2025 11:15:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E7=94=9F=E6=88=90=E9=AB=98?= =?UTF-8?q?=E7=B2=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HQB/Scene/10002_2002_03_OfficeScene.unity | 289 +++++++++++++++++- .../FirstPersonController.cs | 2 +- Assets/Resources/Prefabs/高粱预制体.prefab | 188 ++++++++++++ .../Resources/Prefabs/高粱预制体.prefab.meta | 7 + .../UI/UI_Panel/UI_CheckTaskPanel.prefab | 7 +- .../UI/UI_Panel/UI_GrowthPeriodPanel.prefab | 4 +- .../UI/UI_Panel/UI_MainTitlePanel.prefab | 4 +- .../UI/UI_Panel/UI_TaskListPanel.prefab | 16 +- .../UI/UI_Panel/UI_TopTipPanel.prefab | 4 +- Assets/Scripts/HQB/SorghumController.cs | 52 ++++ Assets/Scripts/HQB/SorghumController.cs.meta | 11 + Assets/Scripts/HQB/SorghumFieldController.cs | 93 ++++++ .../HQB/SorghumFieldController.cs.meta | 11 + .../Project/Objects/Other/NPCController.cs | 27 +- .../Objects/Other/NPC_Attach10002_2002.cs | 172 ++++------- .../Objects/Other/PermanentTriggerBase.cs | 4 +- 16 files changed, 739 insertions(+), 152 deletions(-) create mode 100644 Assets/Resources/Prefabs/高粱预制体.prefab create mode 100644 Assets/Resources/Prefabs/高粱预制体.prefab.meta create mode 100644 Assets/Scripts/HQB/SorghumController.cs create mode 100644 Assets/Scripts/HQB/SorghumController.cs.meta create mode 100644 Assets/Scripts/HQB/SorghumFieldController.cs create mode 100644 Assets/Scripts/HQB/SorghumFieldController.cs.meta diff --git a/Assets/HQB/Scene/10002_2002_03_OfficeScene.unity b/Assets/HQB/Scene/10002_2002_03_OfficeScene.unity index 1f362ef..f7eede0 100644 --- a/Assets/HQB/Scene/10002_2002_03_OfficeScene.unity +++ b/Assets/HQB/Scene/10002_2002_03_OfficeScene.unity @@ -178,6 +178,14 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 2399593117452945568, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_Mass + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945568, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_IsKinematic + value: 0 + objectReference: {fileID: 0} - target: {fileID: 2399593117623680743, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} propertyPath: m_Antialiasing value: 1 @@ -188,6 +196,11 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} +--- !u!4 &267617285 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + m_PrefabInstance: {fileID: 267617284} + m_PrefabAsset: {fileID: 0} --- !u!1 &465194742 GameObject: m_ObjectHideFlags: 0 @@ -352,7 +365,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 919132149155446097, guid: 7b9fb3597fb5dc04faa55be08321ef65, type: 3} propertyPath: m_Name - value: "\u6559\u5E08\uFF08\u5F85\u673A\u52A8\u753B\uFF09 (1)" + value: "\u6559\u5E08\uFF08\u5F85\u673A\u52A8\u753B\uFF09" objectReference: {fileID: 0} - target: {fileID: 7751996367803956135, guid: 7b9fb3597fb5dc04faa55be08321ef65, type: 3} propertyPath: m_Materials.Array.data[4] @@ -360,6 +373,218 @@ PrefabInstance: objectReference: {fileID: 2100000, guid: de88c1d475d9ae040a97b00afaf830e1, type: 2} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 7b9fb3597fb5dc04faa55be08321ef65, type: 3} +--- !u!1 &649240899 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 7b9fb3597fb5dc04faa55be08321ef65, type: 3} + m_PrefabInstance: {fileID: 649240898} + m_PrefabAsset: {fileID: 0} +--- !u!136 &649240900 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 649240899} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.3 + m_Height: 1.8 + m_Direction: 1 + m_Center: {x: 0, y: 0.87, z: 0} +--- !u!114 &649240901 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 649240899} + 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.36862746, g: 0.7490196, b: 0.16862746, 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: 1 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + 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 &649240902 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 649240899} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ba76b9e47a61d284eac9cba888792ed9, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "NPC\u5BA2\u6237" + _highlight: {fileID: 649240901} + spriteRenderer: {fileID: 0} + animator: {fileID: 0} + animatorParameters: + target: {fileID: 267617285} + minDistance: 2 + isClose: 0 --- !u!1 &851143855 GameObject: m_ObjectHideFlags: 0 @@ -514,6 +739,11 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 3247484560037672690, guid: 543377e480fab384db837fbf32857c2e, type: 3} +--- !u!23 &1196400089 stripped +MeshRenderer: + m_CorrespondingSourceObject: {fileID: -9207319362877345106, guid: bb9c532ae1143d34d8245bbea5f5ce9b, type: 3} + m_PrefabInstance: {fileID: 1774722050} + m_PrefabAsset: {fileID: 0} --- !u!64 &1414877079 MeshCollider: m_ObjectHideFlags: 0 @@ -726,6 +956,10 @@ PrefabInstance: propertyPath: m_Name value: "\u519C\u7530 (1)" objectReference: {fileID: 0} + - target: {fileID: 6742833846379967281, guid: bb9c532ae1143d34d8245bbea5f5ce9b, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: bb9c532ae1143d34d8245bbea5f5ce9b, type: 3} --- !u!1 &1774722051 stripped @@ -764,6 +998,24 @@ BoxCollider: serializedVersion: 2 m_Size: {x: 1764.4271, y: 0.00015628338, z: 1506.3827} m_Center: {x: 189.43243, y: 1.0300586, z: -83.80817} +--- !u!1 &1774722055 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 6742833846379967281, guid: bb9c532ae1143d34d8245bbea5f5ce9b, type: 3} + m_PrefabInstance: {fileID: 1774722050} + m_PrefabAsset: {fileID: 0} +--- !u!65 &1774722056 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1774722055} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 114.35687, y: 0.20000686, z: 80.99066} + m_Center: {x: 36.978424, y: 0.00000074505806, z: -20.949902} --- !u!64 &1952885506 MeshCollider: m_ObjectHideFlags: 0 @@ -788,6 +1040,8 @@ GameObject: m_Component: - component: {fileID: 1986188605} - component: {fileID: 1986188606} + - component: {fileID: 1986188607} + - component: {fileID: 1986188608} m_Layer: 0 m_Name: OfficeManager m_TagString: Untagged @@ -822,6 +1076,39 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e84b5b8de3a3f154ba32f7748599c99d, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &1986188607 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1986188604} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 54768282f74235f4da32f0dfb553c700, type: 3} + m_Name: + m_EditorClassIdentifier: + header: {fileID: 0} + custom: {fileID: 0} + headTalkIndex: 0 + customIndex: 0 +--- !u!114 &1986188608 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1986188604} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f83afe5909cafd64aba66a84c659a2c6, type: 3} + m_Name: + m_EditorClassIdentifier: + fieldArea: {fileID: 1196400089} + randomRotate: 1 + rowDistance: 3 + strainDistance: 3 + diseasedRate: 0.5 --- !u!64 &2003267450 MeshCollider: m_ObjectHideFlags: 0 diff --git a/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs b/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs index e998af0..022491c 100644 --- a/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs +++ b/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs @@ -214,7 +214,7 @@ public class FirstPersonController : MonoBehaviour private void Update() { - if (EventSystem.current.IsPointerOverGameObject()) return; + if (!EventSystem.current.IsPointerOverGameObject()) return; float scrollValue = Input.GetAxis("Mouse ScrollWheel"); if (scrollValue != 0) { diff --git a/Assets/Resources/Prefabs/高粱预制体.prefab b/Assets/Resources/Prefabs/高粱预制体.prefab new file mode 100644 index 0000000..717770f --- /dev/null +++ b/Assets/Resources/Prefabs/高粱预制体.prefab @@ -0,0 +1,188 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &963909014448707081 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 963909014448707086} + - component: {fileID: 6594386118979159493} + m_Layer: 0 + m_Name: "\u9AD8\u7CB1\u9884\u5236\u4F53" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &963909014448707086 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963909014448707081} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -5.036208, y: 2.0479388, z: -120.329575} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 786660271097455140} + - {fileID: 786660271681591661} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &6594386118979159493 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963909014448707081} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 004bbb5ca55ea5c43be4d41cdcdcf1f0, type: 3} + m_Name: + m_EditorClassIdentifier: + DiseasedStrain: {fileID: 117401410597684183} + HealthyStrain: {fileID: 117401409998911646} +--- !u!1001 &963909013790211718 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 963909014448707086} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + propertyPath: m_Name + value: "\u9AD8\u7CB1\u75C5\u682A" + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 51c3521496de1854697d5682cc43afe5, type: 3} +--- !u!1 &117401410597684183 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + m_PrefabInstance: {fileID: 963909013790211718} + m_PrefabAsset: {fileID: 0} +--- !u!4 &786660271681591661 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 51c3521496de1854697d5682cc43afe5, type: 3} + m_PrefabInstance: {fileID: 963909013790211718} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &963909014399239631 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 963909014448707086} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} + propertyPath: m_Name + value: "\u9AD8\u7CB1" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} +--- !u!1 &117401409998911646 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} + m_PrefabInstance: {fileID: 963909014399239631} + m_PrefabAsset: {fileID: 0} +--- !u!4 &786660271097455140 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3} + m_PrefabInstance: {fileID: 963909014399239631} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/Resources/Prefabs/高粱预制体.prefab.meta b/Assets/Resources/Prefabs/高粱预制体.prefab.meta new file mode 100644 index 0000000..afb342b --- /dev/null +++ b/Assets/Resources/Prefabs/高粱预制体.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 439b2954b924c554d90ad3002d8c3f3a +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/UI_Panel/UI_CheckTaskPanel.prefab b/Assets/Resources/UI/UI_Panel/UI_CheckTaskPanel.prefab index d231cf9..2f3654a 100644 --- a/Assets/Resources/UI/UI_Panel/UI_CheckTaskPanel.prefab +++ b/Assets/Resources/UI/UI_Panel/UI_CheckTaskPanel.prefab @@ -69,7 +69,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: b16a1d8ffca855a469a0bf7dca3d9452, type: 3} + m_Sprite: {fileID: 21300000, guid: b9abcf3c3b2a5a64b876a85bf4aaacf3, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -139,6 +139,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bdd0b8e335b4b0442ba9a53f19466a61, type: 3} m_Name: m_EditorClassIdentifier: + missionPanel: {fileID: 0} + missionToggle: {fileID: 0} + DocPanel: {fileID: 0} + DocToggle: {fileID: 0} + toggleGroup: {fileID: 0} --- !u!1 &4341684938719071546 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Resources/UI/UI_Panel/UI_GrowthPeriodPanel.prefab b/Assets/Resources/UI/UI_Panel/UI_GrowthPeriodPanel.prefab index 04e2fdb..74c68f2 100644 --- a/Assets/Resources/UI/UI_Panel/UI_GrowthPeriodPanel.prefab +++ b/Assets/Resources/UI/UI_Panel/UI_GrowthPeriodPanel.prefab @@ -172,7 +172,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 1332, y: -110} + m_AnchoredPosition: {x: 1544, y: -152} m_SizeDelta: {x: 140.2748, y: 43.657} m_Pivot: {x: 0, y: 1} --- !u!222 &4378162763038745285 @@ -566,7 +566,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 1127, y: -110} + m_AnchoredPosition: {x: 1339, y: -152} m_SizeDelta: {x: 140.2748, y: 43.657} m_Pivot: {x: 0, y: 1} --- !u!222 &6263590680643393419 diff --git a/Assets/Resources/UI/UI_Panel/UI_MainTitlePanel.prefab b/Assets/Resources/UI/UI_Panel/UI_MainTitlePanel.prefab index 2d6e5fd..23e4b29 100644 --- a/Assets/Resources/UI/UI_Panel/UI_MainTitlePanel.prefab +++ b/Assets/Resources/UI/UI_Panel/UI_MainTitlePanel.prefab @@ -185,7 +185,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 1351.7, y: -23.6} + m_AnchoredPosition: {x: 1155, y: -23.6} m_SizeDelta: {x: 104.4, y: 100} m_Pivot: {x: 0, y: 0.5} --- !u!114 &6953649185375396951 @@ -206,7 +206,7 @@ MonoBehaviour: m_Top: 0 m_Bottom: 0 m_ChildAlignment: 0 - m_Spacing: 20 + m_Spacing: 50 m_ChildForceExpandWidth: 1 m_ChildForceExpandHeight: 1 m_ChildControlWidth: 0 diff --git a/Assets/Resources/UI/UI_Panel/UI_TaskListPanel.prefab b/Assets/Resources/UI/UI_Panel/UI_TaskListPanel.prefab index 5604991..5990b09 100644 --- a/Assets/Resources/UI/UI_Panel/UI_TaskListPanel.prefab +++ b/Assets/Resources/UI/UI_Panel/UI_TaskListPanel.prefab @@ -18,7 +18,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &49510009 RectTransform: m_ObjectHideFlags: 0 @@ -155,11 +155,11 @@ RectTransform: m_Father: {fileID: 105569939733545126} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 26, y: -108} - m_SizeDelta: {x: 139.6921, y: 43.6528} - m_Pivot: {x: 0, y: 1} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 236, y: 100} + m_Pivot: {x: 1, y: 1} --- !u!222 &402120150 CanvasRenderer: m_ObjectHideFlags: 0 @@ -188,7 +188,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 84e1c76bba0fa7648869c649360b7ebf, type: 3} + m_Sprite: {fileID: 21300000, guid: 8f8a49b1351644b44b5c4f42251f836c, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -732,7 +732,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &7581794161413289416 RectTransform: m_ObjectHideFlags: 0 diff --git a/Assets/Resources/UI/UI_Panel/UI_TopTipPanel.prefab b/Assets/Resources/UI/UI_Panel/UI_TopTipPanel.prefab index 7b1db5c..d8ffa91 100644 --- a/Assets/Resources/UI/UI_Panel/UI_TopTipPanel.prefab +++ b/Assets/Resources/UI/UI_Panel/UI_TopTipPanel.prefab @@ -368,8 +368,8 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 6ec5e20009b493c49b5856ba21d8c40e, type: 3} - m_Type: 1 + m_Sprite: {fileID: 21300000, guid: b9abcf3c3b2a5a64b876a85bf4aaacf3, type: 3} + m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 diff --git a/Assets/Scripts/HQB/SorghumController.cs b/Assets/Scripts/HQB/SorghumController.cs new file mode 100644 index 0000000..5c24e5e --- /dev/null +++ b/Assets/Scripts/HQB/SorghumController.cs @@ -0,0 +1,52 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public enum SorghumState +{ + Healthy, + Diseased +} + +public class SorghumController : MonoBehaviour +{ + public GameObject DiseasedStrain; + public GameObject HealthyStrain; + + public SorghumState State = SorghumState.Healthy; + + public bool RandomRotate = true; + + public void Init(SorghumState _state = SorghumState.Healthy, bool _rand = false) + { + State = _state; + DiseasedStrain.SetActive(State == SorghumState.Diseased); + HealthyStrain.SetActive(State == SorghumState.Healthy); + + RandomRotate = _rand; + if (RandomRotate) + { + // »ñÈ¡µ±Ç°Ðýת½Ç¶È + Vector3 currentRotation = transform.eulerAngles; + + // ÉèÖÃYÖáÎªËæ»ú½Ç¶È£¨0µ½360¶È£© + currentRotation.y = Random.Range(0f, 360f); + + // Ó¦ÓÃеÄÐýת½Ç¶È + transform.eulerAngles = currentRotation; + } + } + + + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + } +} diff --git a/Assets/Scripts/HQB/SorghumController.cs.meta b/Assets/Scripts/HQB/SorghumController.cs.meta new file mode 100644 index 0000000..67fdb60 --- /dev/null +++ b/Assets/Scripts/HQB/SorghumController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 004bbb5ca55ea5c43be4d41cdcdcf1f0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/HQB/SorghumFieldController.cs b/Assets/Scripts/HQB/SorghumFieldController.cs new file mode 100644 index 0000000..32daa6d --- /dev/null +++ b/Assets/Scripts/HQB/SorghumFieldController.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class SorghumFieldController : MonoBehaviour +{ + public MeshRenderer fieldArea; + //public GameObject SorghumPrefab; + public bool randomRotate = false; + public float rowDistance = 1; + public float strainDistance = 1; + public float diseasedRate = 0; + + public void InitSorghum(float RowDistance, float StrainDistance, float DiseasedRate, bool RandomRotate = false) + { + + GameObject SorghumPrefab = Resources.Load("Prefabs/¸ßÁ»Ô¤ÖÆÌå"); + if (SorghumPrefab == null || fieldArea == null) + { + Debug.LogError("Ô¤ÖÆÌå»òÅ©ÌïÇøÓòδ·ÖÅ䣡"); + return; + } + + // »ñȡũÌïµÄ°üΧºÐÐÅÏ¢ + BoxCollider fieldCollider = fieldArea.GetComponent(); + if (fieldCollider == null) + { + Debug.LogError("Å©ÌïÇøÓòȱÉÙBoxCollider×é¼þ"); + return; + } + Bounds bounds = fieldCollider.bounds; + + // ¼ÆËãÅ©Ìï±ß½ç + float minX = bounds.min.x; + float maxX = bounds.max.x; + float minZ = bounds.min.z; + float maxZ = bounds.max.z; + + // »ñȡũÌï±íÃæ¸ß¶È£¨¼ÙÉèÎªÆ½Ãæ£© + float groundY = fieldArea.transform.position.y; + + // °´ÐÐÉú³ÉÅ©×÷Îï + for (float x = minX; x <= maxX; x += RowDistance) + { + // °´Ö²Öê¼ä¾àÉú³Éµ¥ÐÐ×÷Îï + for (float z = minZ; z <= maxZ; z += StrainDistance) + { + // Éú³ÉλÖã¨×Ô¶¯¶ÔÆëµØÃæ¸ß¶È£© + Vector3 spawnPos = new Vector3(x, groundY, z); + + // ʵÀý»¯²¢¹ÒÔØµ½Å©ÌïÏ + GameObject obj = Instantiate( + SorghumPrefab, + spawnPos, + Quaternion.identity, + fieldArea.transform + ); + } + } + + SorghumController[] sorghumControllers = FindObjectsOfType(); + int DisCount = (int)(sorghumControllers.Length * DiseasedRate); + for (int i = 0; i < DisCount; i++) + { + int iter = (int)(sorghumControllers.Length * UnityEngine.Random.value); + if (iter >= sorghumControllers.Length) iter = sorghumControllers.Length - 1; + if (iter < 0) iter = 0; + sorghumControllers[iter].Init(SorghumState.Diseased, RandomRotate); + sorghumControllers[iter] = sorghumControllers[sorghumControllers.Length - 1]; + SorghumController[] newArry = new SorghumController[sorghumControllers.Length - 1]; + Array.Copy(sorghumControllers, newArry, sorghumControllers.Length - 1); + } + + foreach (var item in sorghumControllers) + { + item.Init(SorghumState.Healthy, RandomRotate); + } + } + + + //// Start is called before the first frame update + void Start() + { + InitSorghum(rowDistance, strainDistance, diseasedRate, randomRotate); + } + + //// Update is called once per frame + //void Update() + //{ + + //} +} diff --git a/Assets/Scripts/HQB/SorghumFieldController.cs.meta b/Assets/Scripts/HQB/SorghumFieldController.cs.meta new file mode 100644 index 0000000..5ec62a2 --- /dev/null +++ b/Assets/Scripts/HQB/SorghumFieldController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f83afe5909cafd64aba66a84c659a2c6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Project/Objects/Other/NPCController.cs b/Assets/Scripts/Project/Objects/Other/NPCController.cs index 21baad8..c6d2618 100644 --- a/Assets/Scripts/Project/Objects/Other/NPCController.cs +++ b/Assets/Scripts/Project/Objects/Other/NPCController.cs @@ -28,7 +28,7 @@ public class NPCController : PermanentTriggerBase transform.LookAt(target.position); transform.eulerAngles = new Vector3(0, transform.eulerAngles.y, 0); isClose = true; - if (GameManager.UIMgr.GetPanel())//HQB Bug±¨ÈËÎï¿¿½üºó£¬¿¿½ü½»»¥¶ÔÏóµÄÌáʾ»¹ÔÚ + if (GameManager.UIMgr.GetPanel())//HQB Bug±¨ÈËÎï¿¿½üºó£¬¿¿½ü½»»¥¶ÔÏóµÄÌáʾ»¹ÔÚs { GameManager.UIMgr.HidePanel(); } @@ -67,24 +67,25 @@ public class NPCController : PermanentTriggerBase GameManager.UIMgr.GetPanel().Init("Ìáʾ:Çë¿¿½ü½»»¥¶ÔÏó"); if (GameManager.UIMgr.GetPanel() == null) { - GameManager.UIMgr.ShowPanel(E_UI_Layer.System, (p) => - { - p.Init($"Ìáʾ:Çë¿¿½ü½»»¥¶ÔÏó"); - }); + GameManager.UIMgr.ShowPanel(E_UI_Layer.System, (p) => + { + p.Init($"Ìáʾ:Çë¿¿½ü½»»¥¶ÔÏó"); + }); } return; } - if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, false) == 0) - { - talkAction?.Invoke(); - _highlight.SetHighlighted(false); + //if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, false) == 0) + //{ + talkAction?.Invoke(); + _highlight.SetHighlighted(false); + if (spriteRenderer != null) spriteRenderer.gameObject.SetActive(false); - if (animator != null) - { - animator.SetInteger(animatorParameters, 1); - } + if (animator != null) + { + animator.SetInteger(animatorParameters, 1); } + //} } public void StopAnimator() diff --git a/Assets/Scripts/Project/Objects/Other/NPC_Attach10002_2002.cs b/Assets/Scripts/Project/Objects/Other/NPC_Attach10002_2002.cs index 42d2997..a0453b6 100644 --- a/Assets/Scripts/Project/Objects/Other/NPC_Attach10002_2002.cs +++ b/Assets/Scripts/Project/Objects/Other/NPC_Attach10002_2002.cs @@ -19,8 +19,10 @@ public class NPC_Attach10002_2002 : NPC_Attach_Base header = npcs.Find(a => a.triggerName == "NPC¸ºÔðÈË"); custom = npcs.Find(a => a.triggerName == "NPC¿Í»§"); - header.talkAction += HeadTalk; - custom.talkAction += CustomTalk; + if (header != null) + header.talkAction += HeadTalk; + if (custom != null) + custom.talkAction += CustomTalk; } public void Init() @@ -35,91 +37,21 @@ public class NPC_Attach10002_2002 : NPC_Attach_Base /// private void HeadTalk() { - if (ProcessManager.Instance.IsRightSubProcessStepsTriggerID(header.triggerName, false) == 0) - { - if (headTalkIndex == 0) - { - //°àǰ»á - //ÈËÎïվλ - GameObject player=GameObject.FindGameObjectWithTag("Player"); - player.transform.position = new Vector3(-41.85512f, 1.15004f, -96.16238f); - player.transform.eulerAngles = new Vector3(0, 1081.997f, 0); - - GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel) => - { - string tmpstr = ""; - if (GameManager.RunModelMgr.ModeType == E_ModeType.Study) - { - tmpstr = "×Å×°¹æ·¶¡¢¸öÈË·À»¤ÓÃÆ·ºÏ¸ñÆë±¸¡¢ÈËÔ±¾«Éñ״̬Á¼ºÃ£¬¿ÉÒÔ¿ªÕ¹¹¤×÷£¡"; - } - else - { - if (PacksackBagMgr.Instance.wearDic.ContainsKey("¹úÍø°²È«Ã±") && PacksackBagMgr.Instance.wearDic.ContainsKey("¹¤×÷·þ") && PacksackBagMgr.Instance.wearDic.ContainsKey("±àÖ¯ÊÖÌ×") && PacksackBagMgr.Instance.wearDic.ContainsKey("¾øÔµÑ¥") && PacksackBagMgr.Instance.wearDic.ContainsKey("»¤Ä¿¾µ")) - tmpstr = "×Å×°¹æ·¶¡¢¸öÈË·À»¤ÓÃÆ·ºÏ¸ñÆë±¸¡¢ÈËÔ±¾«Éñ״̬Á¼ºÃ£¬¿ÉÒÔ¿ªÕ¹¹¤×÷£¡"; - else - tmpstr = "×Å×°²»¹æ·¶¡¢¸öÈË·À»¤ÓÃÆ·ºÏ¸ñÆë±¸¡¢ÈËÔ±¾«Éñ״̬Á¼ºÃ£¬¿ÉÒÔ¿ªÕ¹¹¤×÷£¡"; - } - - panel.Init(header.triggerName, tmpstr, "¹¤×÷¸ºÔðÈË", 1, (intTemp) => - { - GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel2) => - { - panel2.Init(header.triggerName, "½ñÌ칤×÷ÄÚÈÝÊÇÖ±½Ó½ÓÈëʽµçÄܼÆÁ¿×°ÖÃÂÖ»»×÷Òµ£¬¹¤×÷µØµãÊÇxxx£¬´øµç²¿·Ö£¬¼ÆÁ¿Ïä¼°½ðÊôÂã¶²¿·ÖµÈ£¬ÏÖ³¡×÷Òµ°²È«´ëÊ©¸ù¾Ý¹¤×÷ƱËùÁа²È«ÒªÇó£¬Âäʵ°²È«´ëÊ©.......¡£", "¹¤×÷¸ºÔðÈË", 1, (intTemp2) => - { - ProcessManager.Instance.IsRightSubProcessStepsTriggerID(header.triggerName, true); - header.StopAnimator(); - headTalkIndex++; - ScoreManager.instance.Check("°àǰ»á", null); - }); - }); - - }); - }); - } - else if (headTalkIndex == 1) - { - if (customIndex > 2) - { - //¹¤×÷ƱÖÕ½á - GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel) => - { - panel.Init("×Ô¼º", "¸ºÔðÈË£¬½ñÈÕ»»±í¹¤×÷ÒÑÍê³É", (intTemp) => - { - GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel2) => - { - panel2.Init(header.triggerName, "ºÃµÄ", "¹¤×÷¸ºÔðÈË", 1, (initTmp) => - { - //µ¯³ö¹¤×÷Ʊ - ShowWorkTicket(() => - { - ProcessManager.Instance.IsRightSubProcessStepsTriggerID(header.triggerName, true); - header.StopAnimator(); - headTalkIndex++; - ScoreManager.instance.Check("¹¤×÷ƱÖÕ½á", null); - }); - }); - panel2.transform.Find("ClientSessionPanel/DOWN/ClientContinueBtn/Text (TMP)").GetComponent().text = "°ìÀí¹¤×÷ƱÖÕ½á"; - }); - }, 0); - }); - } - } - } } /// /// ¿Í»§¶Ô»° /// private void CustomTalk() { - if (ProcessManager.Instance.IsRightSubProcessStepsTriggerID(custom.triggerName, false) == 0) - { + //if (ProcessManager.Instance.IsRightSubProcessStepsTriggerID(custom.triggerName, false) == 0) + //{ if (customIndex == 0) { //Óë¿Í»§¹µÍ¨ GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel) => { - panel.Init(custom.triggerName, "ÄúºÃ¡£", "¿Í»§", 0, (intTemp) => + panel.Init(custom.triggerName, "ÄÃÈ¡¹¤¾ß¡£", "¿Í»§", 0, (intTemp) => { ProcessManager.Instance.IsRightSubProcessStepsTriggerID(custom.triggerName, true); custom.StopAnimator(); @@ -127,50 +59,50 @@ public class NPC_Attach10002_2002 : NPC_Attach_Base }); }); } - else if (customIndex == 1) - { - //¶Ïµçºó¶Ô»° - if ((LiveSceneManager.Instance.device_Control as Device_Control_2002).outSwitch.isOpen == false) - { - GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel) => - { - panel.Init(custom.triggerName, "ÄúºÃ£¬½ØÖ¹µ½Ä¿Ç°£¬Äú¼ÒÀÛ¼ÆÓõçÁ¿ÊÇ891.34¶È¡£", "¿Í»§", 0, (intTemp) => - { - ProcessManager.Instance.IsRightSubProcessStepsTriggerID(custom.triggerName, true); - custom.StopAnimator(); - customIndex++; - ScoreManager.instance.Check("¸æÖªÓû§µçÁ¿", null); - }); - }); - } - } - else if (customIndex == 2) - { - //ÏÖ³¡Í깤 - Device_Control_2002 dc = LiveSceneManager.Instance.device_Control as Device_Control_2002; - if (!dc.sundries.gameObject.activeInHierarchy && !dc.meteringDevice.gameObject.name.Contains("Ô­") && !dc.meteringDevice.cover.cover_seal_Left.isCut && !dc.meteringDevice.cover.cover_seal_Right.isCut) - { - GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel) => - { - //µ¯³ö¸æÖªµ¥ - GameManager.UIMgr.ShowPanel(); - panel.Init("×Ô¼º", "¸ÐлÄú¶ÔÎÒÃǹ¤×÷µÄÖ§³Ö£¬Èç¹ûÄúÈÕºóÔÚÓÃµç·½ÃæÓÐʲôÒÉÎÊÐèÇóµÄ£¬¿ÉÒÔÀ´µçÏòÎÒÃÇ×Éѯ£¬ÕâÊÇÎÒÃÇÌ¨Çø¾­ÀíµÄÁªÏµ·½Ê½£¬ÇëÄú»Ý´æ£¬Ð»Ð»£¡", (intTemp) => - { - GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel) => - { - panel.Init(custom.triggerName, "ÒÑÇ©×ÖÈ·ÈÏ", "¿Í»§", 0, intTemp => - { - GameManager.UIMgr.HidePanel(); - ProcessManager.Instance.IsRightSubProcessStepsTriggerID(custom.triggerName, true); - custom.StopAnimator(); - customIndex++; - ScoreManager.instance.Check("ÏÖ³¡Í깤", null); - }); - }); - }, 0); - }); - } - } - } + //else if (customIndex == 1) + //{ + // //¶Ïµçºó¶Ô»° + // if ((LiveSceneManager.Instance.device_Control as Device_Control_2002).outSwitch.isOpen == false) + // { + // GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel) => + // { + // panel.Init(custom.triggerName, "ÄúºÃ£¬½ØÖ¹µ½Ä¿Ç°£¬Äú¼ÒÀÛ¼ÆÓõçÁ¿ÊÇ891.34¶È¡£", "¿Í»§", 0, (intTemp) => + // { + // ProcessManager.Instance.IsRightSubProcessStepsTriggerID(custom.triggerName, true); + // custom.StopAnimator(); + // customIndex++; + // ScoreManager.instance.Check("¸æÖªÓû§µçÁ¿", null); + // }); + // }); + // } + //} + //else if (customIndex == 2) + //{ + // //ÏÖ³¡Í깤 + // Device_Control_2002 dc = LiveSceneManager.Instance.device_Control as Device_Control_2002; + // if (!dc.sundries.gameObject.activeInHierarchy && !dc.meteringDevice.gameObject.name.Contains("Ô­") && !dc.meteringDevice.cover.cover_seal_Left.isCut && !dc.meteringDevice.cover.cover_seal_Right.isCut) + // { + // GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel) => + // { + // //µ¯³ö¸æÖªµ¥ + // GameManager.UIMgr.ShowPanel(); + // panel.Init("×Ô¼º", "¸ÐлÄú¶ÔÎÒÃǹ¤×÷µÄÖ§³Ö£¬Èç¹ûÄúÈÕºóÔÚÓÃµç·½ÃæÓÐʲôÒÉÎÊÐèÇóµÄ£¬¿ÉÒÔÀ´µçÏòÎÒÃÇ×Éѯ£¬ÕâÊÇÎÒÃÇÌ¨Çø¾­ÀíµÄÁªÏµ·½Ê½£¬ÇëÄú»Ý´æ£¬Ð»Ð»£¡", (intTemp) => + // { + // GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel) => + // { + // panel.Init(custom.triggerName, "ÒÑÇ©×ÖÈ·ÈÏ", "¿Í»§", 0, intTemp => + // { + // GameManager.UIMgr.HidePanel(); + // ProcessManager.Instance.IsRightSubProcessStepsTriggerID(custom.triggerName, true); + // custom.StopAnimator(); + // customIndex++; + // ScoreManager.instance.Check("ÏÖ³¡Í깤", null); + // }); + // }); + // }, 0); + // }); + // } + //} + //} } } diff --git a/Assets/Scripts/Project/Objects/Other/PermanentTriggerBase.cs b/Assets/Scripts/Project/Objects/Other/PermanentTriggerBase.cs index 0f94df1..f4a6a94 100644 --- a/Assets/Scripts/Project/Objects/Other/PermanentTriggerBase.cs +++ b/Assets/Scripts/Project/Objects/Other/PermanentTriggerBase.cs @@ -129,13 +129,13 @@ public class PermanentTriggerBase : MonoBehaviour private void OnMouseEnter() { - if (EventSystem.current.IsPointerOverGameObject()) return; + if (!EventSystem.current.IsPointerOverGameObject()) return; OnMEnter(); } private void OnMouseDown() { - if (EventSystem.current.IsPointerOverGameObject()) return; + if (!EventSystem.current.IsPointerOverGameObject()) return; OnMDown(); }