This commit is contained in:
Redsandy
2026-01-18 20:56:24 +03:00
commit 7980e0add8
68 changed files with 1605294 additions and 0 deletions

29
scripts/main_menu.gd Normal file
View File

@@ -0,0 +1,29 @@
extends Control
# Скрипт главного меню
func _ready():
# Подключаем сигналы кнопок
var start_button = get_node_or_null("VBoxContainer/StartButton")
var settings_button = get_node_or_null("VBoxContainer/SettingsButton")
var quit_button = get_node_or_null("VBoxContainer/QuitButton")
if start_button:
start_button.pressed.connect(_on_start_button_pressed)
if settings_button:
settings_button.pressed.connect(_on_settings_button_pressed)
if quit_button:
quit_button.pressed.connect(_on_quit_button_pressed)
func _on_start_button_pressed():
# Переход к игре
get_tree().change_scene_to_file("res://scenes/main.tscn")
func _on_settings_button_pressed():
# TODO: Открыть меню настроек
print("Настройки (пока не реализовано)")
func _on_quit_button_pressed():
# Выход из игры
get_tree().quit()