forked from team-sg/hero-mark-2
41 lines
1.2 KiB
GDScript
41 lines
1.2 KiB
GDScript
extends Control
|
|
|
|
onready var gold_counter = $GoldCounter
|
|
onready var shard_counter = $ShardCounter
|
|
onready var red_star = $RedStar
|
|
onready var yellow_star = $YellowStar
|
|
onready var green_star = $GreenStar
|
|
onready var blue_star = $BlueStar
|
|
onready var magenta_star = $MagentaStar
|
|
onready var score_counter = $ScoreCounter
|
|
onready var arrow_counter = $ArrowCounter
|
|
onready var lives_counter = $LivesCounter
|
|
onready var high_counter = $HighCounter
|
|
onready var time_counter = $TimeCounter
|
|
|
|
func _ready():
|
|
Game.time = 0
|
|
|
|
func _physics_process(delta):
|
|
#Gold Counter
|
|
gold_counter.text = "%02d" % Game.golds
|
|
#Shard Counter
|
|
shard_counter.text = str(Game.shards)
|
|
#Star Counter
|
|
red_star.visible = Game.stars[0]
|
|
yellow_star.visible = Game.stars[1]
|
|
green_star.visible = Game.stars[2]
|
|
blue_star.visible = Game.stars[3]
|
|
magenta_star.visible = Game.stars[4]
|
|
#Score Counter
|
|
score_counter.text = "%05d" % Game.score
|
|
#Arrow Counter
|
|
arrow_counter.text = str(Game.arrows)
|
|
##TOUCH UP LATER
|
|
#Lives counter
|
|
lives_counter.text = str(Game.lives)
|
|
#High counter
|
|
high_counter.text = str("HIGH:") + str("%06d" % Game.high_score)
|
|
##Timer
|
|
Game.time += delta
|
|
time_counter.text = Game.timeify(Game.time)
|