导入敌人模型素材,统一经验和金币掉落物

This commit is contained in:
2026-10-04 18:54:11 +08:00
parent aaa8cf3ee2
commit 01374fec43
253 changed files with 13508 additions and 231 deletions
@@ -30,7 +30,8 @@ namespace SepCore.Entity
float fromHPRatio = _healthComponent.HealthRatio;
_healthComponent.TakeDamage(damageResult.Damage, damageResult.IsCrit, false, hitPosition);
float toHPRatio = _healthComponent.HealthRatio;
if (fromHPRatio > toHPRatio)
bool isDead = _healthComponent.CurrentHealth <= 0;
if (fromHPRatio > toHPRatio && !isDead)
{
GameEntry.HPBar.ShowHPBar(this, fromHPRatio, toHPRatio);
}
@@ -49,7 +50,7 @@ namespace SepCore.Entity
}
}
if (_healthComponent.CurrentHealth <= 0)
if (isDead)
{
OnDead(attacker);
}