mirror of
https://github.com/kodzukye/omens-ascent.git
synced 2026-08-10 13:23:10 +00:00
12 lines
265 B
GDScript
12 lines
265 B
GDScript
class_name HurtBox
|
|
extends Area2D
|
|
|
|
signal hit_received(hitbox: HitBox)
|
|
|
|
func _ready() -> void:
|
|
area_entered.connect(_on_area_entered)
|
|
|
|
func _on_area_entered(area: Area2D) -> void:
|
|
if area is HitBox and area.get_parent() != get_parent():
|
|
hit_received.emit(area)
|