Files
2026-10-07 17:58:02 +08:00

18 lines
340 B
GDScript

extends Area2D
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
pass
func _on_body_entered(body: Node2D) -> void:
if body.is_in_group("Player"):
if body.has_method("take_damage"):
body.take_damage(1)