From 4580a10668c2b79149983e6234aa10e00e8f6bf7 Mon Sep 17 00:00:00 2001 From: keshaohong <740612340@qq.com> Date: Sun, 5 Jul 2026 23:05:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=81=B5=E7=81=AFbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unity/Assets/Scenes/DoorPortal.cs | 3 +- unity/Assets/Scenes/Gameplay.unity | 53 +------------------ unity/Assets/UI/Materials/WaterRippleFade.mat | 4 +- unity/Assets/eco/SpiritLantern.cs | 5 +- unity/UserSettings/EditorUserSettings.asset | 4 +- 5 files changed, 10 insertions(+), 59 deletions(-) diff --git a/unity/Assets/Scenes/DoorPortal.cs b/unity/Assets/Scenes/DoorPortal.cs index 66b3c17..a5c9089 100644 --- a/unity/Assets/Scenes/DoorPortal.cs +++ b/unity/Assets/Scenes/DoorPortal.cs @@ -19,7 +19,8 @@ public class DoorPortal : MonoBehaviour if (!other.CompareTag("Player")) return; // 玩家进入传送门后永久无敌,胜利流程中不再掉血 - var health = other.GetComponent(); + // 用 GetComponentInParent 因为碰撞体可能在子物体上 + var health = other.GetComponentInParent(); if (health != null) { health.MakeInvincible(); // duration<=0 即永久无敌 diff --git a/unity/Assets/Scenes/Gameplay.unity b/unity/Assets/Scenes/Gameplay.unity index cfe4bb2..fc2d259 100644 --- a/unity/Assets/Scenes/Gameplay.unity +++ b/unity/Assets/Scenes/Gameplay.unity @@ -31215,56 +31215,6 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 ---- !u!1 &631691767 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 7 - m_Component: - - component: {fileID: 631691769} - - component: {fileID: 631691768} - m_Layer: 0 - m_HasEditorInfo: 1 - m_Name: GameSpawnManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!114 &631691768 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 631691767} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7d4e960f40679de49b4793a1cd339bec, type: 3} - m_Name: - m_EditorClassIdentifier: - playerPrefab: {fileID: 5335793847516647023, guid: a60578acb930546489d4f5b6d598bce8, type: 3} - enemyPrefabs: [] - enemyCounts: - maxEnemies: 5 - playerSafeDistance: 5 ---- !u!4 &631691769 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 631691767} - serializedVersion: 2 - 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: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &631719236 GameObject: m_ObjectHideFlags: 0 @@ -101483,7 +101433,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: playerPrefab: {fileID: 5335793847516647023, guid: a60578acb930546489d4f5b6d598bce8, type: 3} - doorPrefab: {fileID: 1279378, guid: Dy8asyP/BntP/PMGAMK4lEXOwXWzTmScaNbDYT8D1UJoV6ymcQSNr6Q=, type: 3} + doorPrefab: {fileID: 3382882467993173453, guid: 46210c201672813408e342a375b6c4b4, type: 3} enemyPrefabs: - {fileID: 2150025513644625521, guid: 11f73614f8ff05e42a78a4747e4209b9, type: 3} - {fileID: 2150025513644625521, guid: 5e1db01cdb919944395a115f55a807cc, type: 3} @@ -103529,4 +103479,3 @@ SceneRoots: - {fileID: 1115832006} - {fileID: 2106106797} - {fileID: 2084288743} - - {fileID: 631691769} diff --git a/unity/Assets/UI/Materials/WaterRippleFade.mat b/unity/Assets/UI/Materials/WaterRippleFade.mat index b0dcea3..c604313 100644 --- a/unity/Assets/UI/Materials/WaterRippleFade.mat +++ b/unity/Assets/UI/Materials/WaterRippleFade.mat @@ -59,10 +59,10 @@ Material: - _DecalMeshDepthBias: 0 - _DecalMeshViewBias: 0 - _DrawOrder: 0 - - _FadeAlpha: 1 + - _FadeAlpha: 0.99226975 - _RippleAmplitude: 0.0412 - _RippleFrequency: 10.5 - - _RippleIntensity: -0 + - _RippleIntensity: 0.35745206 - _RippleSpeed: 3 - _Shininess: 0.2 - _Stencil: 0 diff --git a/unity/Assets/eco/SpiritLantern.cs b/unity/Assets/eco/SpiritLantern.cs index 836cf45..0128b52 100644 --- a/unity/Assets/eco/SpiritLantern.cs +++ b/unity/Assets/eco/SpiritLantern.cs @@ -121,12 +121,13 @@ namespace IndianOceanAssets.Engine2_5D if (_recalled) return; _recalled = true; - // 1. 立即取消事件订阅 + 通知系统(回收灵灯名额) + // 1. 先触发回收事件(通知系统返还名额),再取消订阅 + OnLanternRecalled?.Invoke(); + if (_ownerSystem != null) { _ownerSystem.UnregisterLantern(this); } - OnLanternRecalled?.Invoke(); OnLanternRecalled = null; // 2. 禁用碰撞体,开始渐隐 diff --git a/unity/UserSettings/EditorUserSettings.asset b/unity/UserSettings/EditorUserSettings.asset index 3f9c886..0e02cd4 100644 --- a/unity/UserSettings/EditorUserSettings.asset +++ b/unity/UserSettings/EditorUserSettings.asset @@ -30,10 +30,10 @@ EditorUserSettings: value: 5a5757560101590a5d0c0e24427b5d44434e4c7a7b7a23677f2b4565b7b5353a flags: 0 RecentlyUsedSceneGuid-8: - value: 0209025f575750595c57092149765d444e4e49727e7c7068757b1c65b6e36c3b + value: 5a55515156575a0b0f56592346260f444f16197c7e7f24697d2a4a32b1b0353e flags: 0 RecentlyUsedSceneGuid-9: - value: 5a55515156575a0b0f56592346260f444f16197c7e7f24697d2a4a32b1b0353e + value: 0209025f575750595c57092149765d444e4e49727e7c7068757b1c65b6e36c3b flags: 0 UnityEditor.ShaderGraph.Blackboard: value: 18135939215a0a5004000b0e15254b524c030a3f2964643d120d1230e9e93a3fd6e826abbd2e2d293c4ead313b08042de6030a0afa240c0d020be94c4ba75e435d8715fa32c70d15d11612dacc11fee5d3c5d1fe9ab1bf968e93e2ffcbc3e7e2f0b3ffe0e8b0be9af8ffaeffff8e85dd8390e3949c8899daa7