20 lines
521 B
GDScript
20 lines
521 B
GDScript
extends Node2D
|
|
|
|
onready var startGameButton = $Sprite/MarginContainer/HBoxContainer/StartGameButton
|
|
onready var quitGameButton = $Sprite/MarginContainer/HBoxContainer/QuitGameButton
|
|
|
|
func _ready():
|
|
startGameButton.grab_focus()
|
|
|
|
func _process(_delta):
|
|
if startGameButton.is_hovered():
|
|
startGameButton.grab_focus()
|
|
elif quitGameButton.is_hovered():
|
|
quitGameButton.grab_focus()
|
|
|
|
func _on_StartGameButton_pressed():
|
|
get_tree().change_scene("res://Scene/GameMap.tscn")
|
|
|
|
func _on_QuitGame_pressed():
|
|
get_tree().quit()
|