11 lines
172 B
GDScript3
11 lines
172 B
GDScript3
|
extends Area2D
|
||
|
|
||
|
@onready var game = %SceneManager
|
||
|
signal coinCollected
|
||
|
|
||
|
|
||
|
func _on_body_entered(body):
|
||
|
if body.is_in_group("player"):
|
||
|
coinCollected.emit()
|
||
|
queue_free()
|