GodotCourse/scripts/Trigger.gd
2024-08-14 21:21:00 -04:00

9 lines
175 B
GDScript

extends Area2D
@export var effect = "alert"
signal areatrigger(effect, Object)
func _on_body_entered(body):
if body.is_in_group("sprite"):
areatrigger.emit(effect, body)