2023-01-07 12:03:21 +01:00
|
|
|
extends Control
|
|
|
|
|
|
|
|
signal play_pressed()
|
|
|
|
|
|
|
|
|
|
|
|
func play():
|
2023-01-09 20:41:22 +01:00
|
|
|
print("Player ", Singletons.username, " started playing!")
|
2023-01-07 12:03:21 +01:00
|
|
|
emit_signal("play_pressed")
|
2023-01-09 15:15:59 +01:00
|
|
|
|
|
|
|
|
2023-01-09 20:41:22 +01:00
|
|
|
func _on_name_input_text_changed():
|
2023-01-09 15:15:59 +01:00
|
|
|
Singletons.username = $Content/Inputs/NameInput.text
|
2023-01-09 17:43:16 +01:00
|
|
|
%PlayButton.disabled = false
|
2023-01-14 22:31:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
func _on_fetched_scores():
|
|
|
|
$Content/Buttons/HBoxContainer/ScoresButton.disabled = false
|
|
|
|
$Content/Buttons/HBoxContainer/ScoresButton.connect("pressed", $"/root/BaseScene/ScoreboardContainer".show_scores)
|
|
|
|
|
|
|
|
|
|
|
|
func _ready():
|
|
|
|
$"/root/BaseScene/ScoreboardContainer".connect("fetched_scores", _on_fetched_scores)
|
|
|
|
$"/root/BaseScene/ScoreboardContainer".fetch_scores(false)
|