Files
Embodiment/Levels/Interactives/coin.gd
2021-12-05 21:07:17 -06:00

11 lines
204 B
GDScript

extends Area2D
signal coin_grabbed
func _on_Node2D_body_entered(body: Node) -> void:
if body.get_name() == 'Player':
emit_signal("coin_grabbed")
print("coin!")
queue_free()