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