20 lines
522 B
GDScript
20 lines
522 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/TestScene.tscn")
|
|
|
|
func _on_QuitGame_pressed():
|
|
get_tree().quit()
|