导入敌人模型素材,统一经验和金币掉落物
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user