This repository has been archived on 2022-03-31. You can view files and clone it, but cannot push or open issues or pull requests.
Tyra/scripts/menuPrincipal.gd

18 lines
597 B
GDScript3
Raw Normal View History

2021-04-08 02:31:29 +02:00
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()