Add elemental VFX when hitting enemies (2D only currently)
This commit is contained in:
@@ -169,8 +169,9 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
|
||||
|
||||
}
|
||||
|
||||
public virtual void TakeHit()
|
||||
public virtual void TakeHit(ElementType damageElementType)
|
||||
{
|
||||
EnemyModelView.PlayElementalDamageAnimation(damageElementType);
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Alert());
|
||||
EnemyModelView.PlayHitAnimation();
|
||||
_hitSFX.Play();
|
||||
@@ -281,8 +282,8 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
|
||||
|
||||
private void _rustTimer_Timeout()
|
||||
{
|
||||
HealthComponent.Damage(3);
|
||||
TakeHit();
|
||||
HealthComponent.Damage(3, ElementType.Ferrum);
|
||||
TakeHit(ElementType.Ferrum);
|
||||
}
|
||||
|
||||
private void _rustDuration_Timeout()
|
||||
|
||||
Reference in New Issue
Block a user