class_name DeathArea
extends Area3D

@export var death_type := GameGlobals.DeathTypes.SAW


func _ready() -> void:
    body_entered.connect(_on_body_entered)


func _on_body_entered(body: Node3D) -> void:
    if body == GameGlobals.get_player():
        GameGlobals.kill_player(death_type)