优化敌人碰到死亡时的表现效果

This commit is contained in:
2026-07-05 21:17:26 +08:00
parent 670b746599
commit ad90d35bd7
9 changed files with 287 additions and 7 deletions
+5
View File
@@ -86,6 +86,11 @@ namespace IndianOceanAssets.Engine2_5D
HealthSystem health = other.GetComponent<HealthSystem>();
if (health != null)
{
// 激活怪物身上的灵灯光照(3秒亮起效果)
var lanternLight = other.GetComponent<EnemyLanternLight>();
if (lanternLight != null)
lanternLight.ActivateLight();
// 在伤害前记录信息(用于掉落,因为 Die() 会 Destroy gameObject
Vector3 deathPos = other.transform.position;
int enemyMaxHp = health.MaxHealth;