Sync weapon equip to hitbox damage
This commit is contained in:
@@ -106,12 +106,12 @@ public partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLogic>
|
||||
|
||||
public void OnPlayerHitboxEntered(Area3D body)
|
||||
{
|
||||
if (body.GetParent() is IPlayer)
|
||||
if (body is IHitbox hitBox)
|
||||
{
|
||||
if (CurrentHP > 0)
|
||||
{
|
||||
GD.Print("Enemy Hit");
|
||||
EnemyLogic.Input(new EnemyLogic.Input.HitByPlayer());
|
||||
EnemyLogic.Input(new EnemyLogic.Input.HitByPlayer(hitBox.Damage));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user