FebruaryGame/februarygodotgame/scripts/coin.gd

8 lines
180 B
GDScript3
Raw Permalink Normal View History

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