-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_menu.gd
More file actions
34 lines (21 loc) · 740 Bytes
/
main_menu.gd
File metadata and controls
34 lines (21 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
extends Control
@onready var start_button: Button = $VBoxContainer/startButton
@onready var exit_button: Button = $VBoxContainer/exitButton
func _ready() -> void:
BGM.play()
start_button.grab_focus()
Global.reset_global_vars()
func _on_start_button_pressed() -> void:
get_tree().change_scene_to_file("res://scenes/carSelect.tscn")
ButtonSFX.play()
Global.reset_global_vars()
func _on_start_button_mouse_entered() -> void:
start_button.grab_focus()
func _on_exit_button_pressed() -> void:
get_tree().quit()
func _on_start_button_focus_entered() -> void:
ButtonSelectSFX.play()
func _on_exit_button_mouse_entered() -> void:
exit_button.grab_focus()
func _on_exit_button_focus_entered() -> void:
ButtonSelectSFX.play()