class_name Coin extends Area2D signal coinCollectedSignal(body, coin) func _on_body_entered(body: Node2D) -> void: print("Coin collision") coinCollectedSignal.emit(body, self)