Update hitboxes for consistency (#608)

Co-authored-by: Joe H <97353363+JHDev2006@users.noreply.github.com>
This commit is contained in:
John Cooper McDonald
2025-10-17 11:12:57 -05:00
committed by GitHub
parent ed297891fd
commit 9a17f140e0
27 changed files with 246 additions and 209 deletions

View File

@@ -1,11 +1,8 @@
class_name Hammer
extends Node2D
var velocity := Vector2(0, -200)
var direction := -1
extends Enemy
func _ready() -> void:
velocity = Vector2(0, -200)
$Sprite.flip_h = direction == 1
$Animations.speed_scale = -direction
velocity.x = 120 * direction
@@ -16,10 +13,3 @@ func _physics_process(delta: float) -> void:
global_position += velocity * delta
velocity.y += (Global.entity_gravity / delta) * delta
velocity.y = clamp(velocity.y, -INF, Global.entity_max_fall_speed)
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()