coin.gd 158 B

123456789
  1. extends Area2D
  2. var taken=false
  3. func _on_coin_body_enter( body ):
  4. if not taken and body is preload("res://player.gd"):
  5. $anim.play("taken")
  6. taken = true