Properly implement the Hammer item (#599)

* Properly implement the Hammer item

* Update Boo.gd

* Update LongFirebar.tscn
This commit is contained in:
John Cooper McDonald
2025-10-15 12:14:19 -05:00
committed by GitHub
parent 651988bf5e
commit 8474bc3c19
48 changed files with 143 additions and 21 deletions

View File

@@ -37,3 +37,12 @@ func flag_die() -> void:
Global.score += 500
if score_note_adder != null:
score_note_adder.spawn_note(500)
func die_from_hammer(obj: Node2D) -> void:
var dir = sign(global_position.x - obj.global_position.x)
if dir == 0:
dir = [-1, 1].pick_random()
DiscoLevel.combo_amount += 1
AudioManager.play_sfx("hammer_hit", global_position)
killed.emit(dir)
queue_free()