1
Fork 0
mirror of https://github.com/Steffo99/pineapple-surf.git synced 2024-11-21 23:34:21 +00:00
pineapple-surf/menu/Menu.gd
Stefano Pigozzi 23747addd1
Implement many post-jam details
- Do not kick to the main menu after reaching the goal
- Display the current player in yellow on the scoreboard
- Add a new leafpile on the sand islands
- Add timer and speedometer
2023-01-14 22:31:02 +01:00

23 lines
635 B
GDScript

extends Control
signal play_pressed()
func play():
print("Player ", Singletons.username, " started playing!")
emit_signal("play_pressed")
func _on_name_input_text_changed():
Singletons.username = $Content/Inputs/NameInput.text
%PlayButton.disabled = false
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)