Zombie signal fix
This commit is contained in:
parent
9f454b2505
commit
fd7060e5c5
3 changed files with 6 additions and 2 deletions
|
|
@ -66,3 +66,7 @@ position = Vector2(848, 254)
|
|||
_line = 3
|
||||
|
||||
[connection signal="timeout" from="SunSpawner/Timer" to="SunSpawner" method="Spawn"]
|
||||
[connection signal="OnHPChanged" from="Zombie" to="Zombie/AudioStreamPlayer2D" method="OnHPChanged"]
|
||||
[connection signal="OnHPChanged" from="Zombie2" to="Zombie2/AudioStreamPlayer2D" method="OnHPChanged"]
|
||||
[connection signal="OnHPChanged" from="Zombie3" to="Zombie3/AudioStreamPlayer2D" method="OnHPChanged"]
|
||||
[connection signal="OnHPChanged" from="Zombie4" to="Zombie4/AudioStreamPlayer2D" method="OnHPChanged"]
|
||||
|
|
|
|||
|
|
@ -213,6 +213,6 @@ stream = ExtResource("8_di4dd")
|
|||
script = ExtResource("9_oxd1e")
|
||||
|
||||
[connection signal="OnHPChanged" from="." to="CanvasGroup" method="DamageFlash"]
|
||||
[connection signal="OnHPChanged" from="." to="AudioStreamPlayer2D" method="OnHPChanged"]
|
||||
[connection signal="OnHPChanged" from="." to="AudioStreamPlayer2D" method="OnDamaged"]
|
||||
[connection signal="area_entered" from="Eatbox" to="Eatbox" method="OnAreaEntered"]
|
||||
[connection signal="area_exited" from="Eatbox" to="Eatbox" method="OnAreaExited"]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using System;
|
|||
|
||||
public partial class AudioDamage : AudioStreamPlayer2D
|
||||
{
|
||||
public void OnHPChanged(int amount)
|
||||
public void OnDamaged(int amount)
|
||||
{
|
||||
Play();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue