mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-23 07:58:09 +00:00
Update hitboxes for consistency (#608)
Co-authored-by: Joe H <97353363+JHDev2006@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
ed297891fd
commit
9a17f140e0
@@ -1,10 +1,9 @@
|
||||
class_name BowserFlame
|
||||
extends Node2D
|
||||
extends Enemy
|
||||
|
||||
@export_enum("Straight", "Aimed") var mode := 0
|
||||
|
||||
var target_y := 0
|
||||
var direction := -1
|
||||
|
||||
func _ready() -> void:
|
||||
pass
|
||||
@@ -16,14 +15,7 @@ func movement(delta: float) -> void:
|
||||
if mode == 1:
|
||||
global_position.y = move_toward(global_position.y, target_y, delta * 50)
|
||||
global_position.x += (100 * direction) * delta
|
||||
$Sprite.scale.x = direction
|
||||
|
||||
func flag_die() -> void:
|
||||
queue_free()
|
||||
|
||||
func on_area_entered(area: Area2D) -> void:
|
||||
if area.owner is Player and area.name != "HammerHitbox":
|
||||
area.owner.damage()
|
||||
$Sprite.scale.x = -direction
|
||||
|
||||
func play_sfx() -> void:
|
||||
AudioManager.play_sfx("bowser_flame", global_position)
|
||||
|
Reference in New Issue
Block a user