forked from team-sg/hero-mark-2
15 lines
271 B
GDScript
15 lines
271 B
GDScript
extends Node2D
|
|
|
|
export var value = 1
|
|
|
|
func _ready():
|
|
#Sync all coinframes
|
|
$AnimatedSprite.play()
|
|
|
|
func _on_Area2D_area_entered(area):
|
|
#Collect
|
|
if area.is_in_group("player"):
|
|
Game.stars += value
|
|
#5 Star reward
|
|
if Game.stars == 5: Game.shards += 1
|
|
queue_free()
|