2022-11-09 12:09:17 +00:00
|
|
|
extends Control
|
|
|
|
|
2023-03-29 12:32:57 +00:00
|
|
|
@onready var player_vars = get_node("/root/PlayerVariables")
|
|
|
|
@onready var game_time = get_node("/root/GameTimer")
|
2022-11-09 12:09:17 +00:00
|
|
|
|
|
|
|
func _ready():
|
2023-03-29 12:32:57 +00:00
|
|
|
game_time.connect("heartbeat", Callable(self, "_on_heartbeat"))
|
2022-11-09 12:09:17 +00:00
|
|
|
|
|
|
|
func _on_heartbeat():
|
|
|
|
$PupilsLabel.text = str(player_vars.pupil_pop)
|
|
|
|
$TeacherLabel.text = str(player_vars.teacher_pop)
|
|
|
|
$ClassroomLabel.text = str(player_vars.classroom_count)
|
|
|
|
if player_vars.has_cpdroom == true:
|
|
|
|
$CPDRoomLabel.text = str("HasCPDRoom")
|
|
|
|
|
|
|
|
func _on_AddMoney_pressed():
|
|
|
|
player_vars.funds += 100000
|
|
|
|
|
|
|
|
|
|
|
|
func _on_StaffroomButton_pressed():
|
|
|
|
if player_vars.has_staffroom == true:
|
|
|
|
$StaffroomLabel.text = str("HasStaffroom")
|