forked from team-sg/hero-mark-2
renamed gold to key
This commit is contained in:
parent
139a6c50de
commit
2281627223
19 changed files with 38 additions and 87 deletions
15
objects/collectibles/key.gd
Normal file
15
objects/collectibles/key.gd
Normal file
|
@ -0,0 +1,15 @@
|
|||
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.golds += value
|
||||
Game.score += 5
|
||||
Audio.play_sound(Audio.a_gold,Audio.ac_collectible)
|
||||
queue_free()
|
Loading…
Add table
Add a link
Reference in a new issue