修复灵灯bug
This commit is contained in:
@@ -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 即永久无敌
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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. 禁用碰撞体,开始渐隐
|
||||
|
||||
Reference in New Issue
Block a user