Files
Omens-Ascent/scenes/components/death_zone.gd

12 lines
205 B
GDScript

class_name DeathZone
extends Area2D
func _ready() -> void:
body_entered.connect(_on_body_entered)
func _on_body_entered(body: Node2D) -> void:
if not body.is_in_group("player"):
return
body.kill()