only connect player timer to _on_hit_end once
This commit is contained in:
parent
115bcf8817
commit
ab075045d5
1 changed files with 2 additions and 1 deletions
|
|
@ -27,6 +27,7 @@ func _on_hit(hitbox: Area2D) -> void:
|
|||
var player: Player = hitbox.get_parent()
|
||||
var timer: Timer = player.hit_timer
|
||||
launch()
|
||||
if not timer.is_connected("timeout", _on_hit_end):
|
||||
timer.connect("timeout", _on_hit_end)
|
||||
EventBus.ball_hit.emit(player.id, linear_velocity)
|
||||
is_hit = true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue