GodotCourse/week5/updated_project/scripts/coin.gd

8 lines
127 B
GDScript3
Raw Normal View History

2024-08-12 19:19:54 +00:00
extends Area2D
@onready var game = $".."
func _on_body_entered(body):
if body.is_in_group("player"):
game.coinCollected()