extends StaticBody2D

signal change_score




func _ready() -> void:
	var score = get_tree().get_root().find_node("GUI", true, false)
	score.connect("change_score", score, "handle_change_score")
	print(score)




func _on_GoalArea_body_entered(body: Node) -> void:
	if body.is_in_group("Balls"):
		print("Yatta!")
		emit_signal("change_score", 10)
		body.queue_free()


