change Player.cs to emit PlayerHurt on receiving damage
parent
0cd13d5b5b
commit
2fb3bf34fa
|
@ -174,6 +174,11 @@ public sealed partial class Player : Character
|
||||||
GetNode<GpuParticles2D>("Effects/HurtParticles")
|
GetNode<GpuParticles2D>("Effects/HurtParticles")
|
||||||
.SetDirection(knockbackDir);
|
.SetDirection(knockbackDir);
|
||||||
|
|
||||||
|
Events.EventBus.Instance.EmitSignal(
|
||||||
|
Events.EventBus.SignalName.PlayerHurt,
|
||||||
|
new Events.HurtArgs { Attacker = inflictor, Weapon = weapon }
|
||||||
|
);
|
||||||
|
|
||||||
base.OnReceivedDamage(damage,
|
base.OnReceivedDamage(damage,
|
||||||
inflictor,
|
inflictor,
|
||||||
knockback,
|
knockback,
|
||||||
|
|
Loading…
Reference in New Issue