forked from team-sg/hero-mark-2
18 lines
507 B
GDScript
18 lines
507 B
GDScript
extends Node2D
|
|
|
|
export var value = 1
|
|
export var number = 0 #Used for saving which specific shards collected
|
|
|
|
func _ready():
|
|
$AnimationPlayer.play("glow")
|
|
|
|
func _on_Area2D_area_entered(area):
|
|
#Collect
|
|
if area.is_in_group("player"):
|
|
Game.ac_music.stream_paused = true
|
|
Game.play_sound(Game.a_shard,Game.ac_collectible)
|
|
Game.ac_collectible.connect("finished", Game.ac_music, "set_stream_paused", [false])
|
|
Game.score += 500
|
|
Game.shards += value
|
|
Game.shards_collected[number] = true
|
|
queue_free()
|