Files
NovemberGodotGame/novembergame/scripts/coin.gd
T

12 lines
175 B
GDScript
Raw Normal View History

2024-12-16 21:14:32 -05:00
class_name Coin extends Area2D
signal coinCollected
func _on_body_entered(body: Node2D) -> void:
if body.is_in_group("player"):
coinCollected.emit()
queue_free()