18 lines
597 B
GDScript3
18 lines
597 B
GDScript3
|
extends Node2D
|
||
|
|
||
|
func _ready():
|
||
|
$MarginContainer/VBoxContainer/VBoxContainer/Jouer.grab_focus()
|
||
|
|
||
|
func _physics_process(_delta):
|
||
|
if $MarginContainer/VBoxContainer/VBoxContainer/Jouer.is_hovered() == true:
|
||
|
$MarginContainer/VBoxContainer/VBoxContainer/Jouer.grab_focus()
|
||
|
if $MarginContainer/VBoxContainer/VBoxContainer/Quitter.is_hovered() == true:
|
||
|
$MarginContainer/VBoxContainer/VBoxContainer/Quitter.grab_focus()
|
||
|
|
||
|
func _on_Jouer_pressed():
|
||
|
if get_tree().change_scene("res://scenes/Monde1.tscn") != OK:
|
||
|
print("Impossible de charger le jeu.")
|
||
|
|
||
|
func _on_Quitter_pressed():
|
||
|
get_tree().quit()
|