extends Area2D
var collecting_times = 0
func ready():
$AnimationPlayer.play("move")
collectingtimes = 0
pass
signal coin_collected
func oncoinbodyentered(body):
collectingtimes += 1
if collectingtimes == 1:
emitsignal("coincollected")
$AudioStreamPlayer.play()
pass # Replace with function body.
func onAudioStreamPlayerfinished():
queuefree()
pass # Replace with function body.