June 2018
Beginner to intermediate
298 pages
7h 38m
English
Add a Button node and change its name to StartButton. This button will be displayed before the game starts, and when clicked, it will hide itself and send a signal to the Main scene to start the game. Set the Text property to Start and change the custom font like you did with the MessageLabel. In the Layout menu, choose Center Bottom. This will put the button at the very bottom of the screen, so move it up a little bit either by pressing the Up arrow key or by editing the margins and setting Top to -150 and Bottom to -50.
When a button is clicked, a signal is sent out. In the Node tab for the StartButton, connect the pressed() signal:
func _on_StartButton_pressed(): $StartButton.hide() $MessageLabel.hide() emit_signal("start_game") ...Read now
Unlock full access