Reworked main menu. Fixed projectiles bug

This commit is contained in:
2025-11-11 23:59:08 +03:00
parent 49c47f5330
commit 767e75d635
20 changed files with 156 additions and 140 deletions
+47
View File
@@ -0,0 +1,47 @@
extends Control
@onready var main_menu : Control = $MainMenu
@onready var options : Control = $Options
@onready var credits : Control = $Credits
func _ready() -> void:
_show_menu(main_menu)
func _show_menu(menu: Control) -> void:
var menus : Array[Control] = [ main_menu, options, credits ]
for m in menus:
m.hide()
menu.show()
func _on_main_menu_continue_game() -> void:
print("continue")
func _on_main_menu_new_game() -> void:
get_tree().change_scene_to_file("res://game/game.tscn")
func _on_main_menu_quit_game() -> void:
get_tree().quit()
func _on_main_menu_show_options() -> void:
_show_menu(options)
func _on_options_show_credits() -> void:
_show_menu(credits)
func _on_options_back() -> void:
_show_menu(main_menu)
func _on_credits_back() -> void:
_show_menu(options)