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,18 +1,9 @@
class_name Explosion
extends Node2D
extends Enemy
const destructable_tiles := {Vector2i(4, 0): Rect2(32, 160, 16, 16), Vector2i(4, 2): Rect2(48, 160, 16, 16)}
const BLOCK_DESTRUCTION_PARTICLES = preload("uid://cyw7kk1em8h16")
func on_body_entered(body: Node2D) -> void:
if body is Block:
if body.destructable: body.destroy()
if body is Player:
body.damage()
func on_area_entered(area: Area2D) -> void:
if area.owner is Player and area.name != "HammerHitbox":
area.owner.damage()