The changes include: - Moving script files to scripts/ directory - Creating Start menu scene with Play/Quit buttons - Adding scene switching between menu and gameplay - Creating theme for menu buttons - Adding ESC key to return to menu
10 lines
227 B
GDScript
10 lines
227 B
GDScript
extends Control
|
|
func _ready():
|
|
%Button_Play.pressed.connect(play)
|
|
%Button_Quit.pressed.connect(quit_game)
|
|
|
|
func play():
|
|
get_tree().change_scene_to_file('res://scenes/gameplay.tscn')
|
|
|
|
func quit_game():
|
|
get_tree().quit()
|