mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
Properly implement the Hammer item (#599)
* Properly implement the Hammer item * Update Boo.gd * Update LongFirebar.tscn
This commit is contained in:

committed by
GitHub

parent
651988bf5e
commit
8474bc3c19
@@ -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()
|
||||
|
Reference in New Issue
Block a user