forked from team-sg/hero-mark-2
first commit
This commit is contained in:
commit
096ebe5aa4
275 changed files with 3937 additions and 0 deletions
16
objects/barrier/barrier.gd
Normal file
16
objects/barrier/barrier.gd
Normal file
|
@ -0,0 +1,16 @@
|
|||
extends Node2D
|
||||
|
||||
export var cost = 0
|
||||
onready var label = $Label
|
||||
|
||||
func _ready():
|
||||
label.visible = true
|
||||
label.set_text(str(cost))
|
||||
|
||||
func _physics_process(delta):
|
||||
#Open
|
||||
if Game.golds >= cost: $AnimationPlayer.play("open")
|
||||
|
||||
func _on_AnimationPlayer_animation_finished(anim_name):
|
||||
if anim_name == "open":
|
||||
queue_free()
|
Loading…
Add table
Add a link
Reference in a new issue