extends Area2D

var killing = null
@export var detecting := false

func _on_body_shape_entered(body_rid, body, body_shape_index, local_shape_index):
	if "die" in body and detecting:
		killing = body

func _physics_process(delta):
	if killing:
		killing.die()
		killing = null
