coin.gd 195 B

1234567891011
  1. extends Area2D
  2. @onready var animation = $AnimationPlayer
  3. func _ready() -> void:
  4. animation.play("rotation")
  5. func _on_body_entered(player: Node2D) -> void:
  6. player.collect_coin()
  7. queue_free()