修复灵灯bug

This commit is contained in:
2026-07-05 23:05:36 +08:00
parent c06a8abad0
commit 4580a10668
5 changed files with 10 additions and 59 deletions
+2 -1
View File
@@ -19,7 +19,8 @@ public class DoorPortal : MonoBehaviour
if (!other.CompareTag("Player")) return;
// 玩家进入传送门后永久无敌,胜利流程中不再掉血
var health = other.GetComponent<HealthSystem>();
// 用 GetComponentInParent 因为碰撞体可能在子物体上
var health = other.GetComponentInParent<HealthSystem>();
if (health != null)
{
health.MakeInvincible(); // duration<=0 即永久无敌
+1 -52
View File
@@ -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}