FebGame/febfabgame/Scripts/coin.gd

8 lines
180 B
GDScript

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