hero-mark-2/objects/collectibles/shard.gd
2022-12-08 23:28:49 -05:00

14 lines
273 B
GDScript

extends Node2D
export var value = 1
func _ready():
$AnimationPlayer.play("glow")
func _on_Area2D_area_entered(area):
#Collect
if area.is_in_group("player"):
Game.play_sound(Game.a_shard,Game.ac_collectible)
Game.score += 500
Game.shards += value
queue_free()