Add utility strings, update game state with drone count and points calculation.
This commit is contained in:
parent
d879ca30bd
commit
491395e6b9
7 changed files with 105 additions and 5 deletions
|
|
@ -1,8 +1,18 @@
|
|||
extends Control
|
||||
|
||||
@onready var time_label = get_node("%TimeSpent")
|
||||
@onready var drones_label = get_node("%DronesUsed")
|
||||
@onready var points_label = get_node("%TotalPoints")
|
||||
|
||||
func _ready():
|
||||
visible = false
|
||||
|
||||
func _process(_delta):
|
||||
if GameState.level_complete == true:
|
||||
update_points()
|
||||
visible = true
|
||||
|
||||
func update_points():
|
||||
time_label.text = "Time Spent: " + Str.seconds_to_hms(GameState.level_timer)
|
||||
drones_label.text = "Drones Used: " + str(GameState.drones_used)
|
||||
points_label.text = "Total Points: " + Str.format_number(GameState.level_points)
|
||||
Loading…
Add table
Add a link
Reference in a new issue