refactor structure

This commit is contained in:
2025-09-22 11:43:09 +04:00
committed by nett00n
parent 4e0b5fe3d2
commit 9b3a20cdf1
149 changed files with 518 additions and 214 deletions

View File

@@ -0,0 +1,30 @@
extends Node
const GAME_SCENE_PATH := "res://scenes/game/game.tscn"
const MAIN_SCENE_PATH := "res://scenes/main/main.tscn"
const MATCH3_SCENE_PATH := "res://scenes/match3/match3.tscn"
func start_new_game() -> void:
var packed_scene := load(GAME_SCENE_PATH)
if not packed_scene or not packed_scene is PackedScene:
push_error("Failed to load Game scene at: %s" % GAME_SCENE_PATH)
return
get_tree().change_scene_to_packed(packed_scene)
func save_game() -> void:
print("Game saved (mock)")
func exit_to_main_menu() -> void:
var packed_scene := load(MAIN_SCENE_PATH)
if not packed_scene or not packed_scene is PackedScene:
push_error("Failed to load Main scene at: %s" % MAIN_SCENE_PATH)
return
get_tree().change_scene_to_packed(packed_scene)
func start_match3_game() -> void:
var packed_scene := load(MATCH3_SCENE_PATH)
if not packed_scene or not packed_scene is PackedScene:
push_error("Failed to load Match3 scene at: %s" % MATCH3_SCENE_PATH)
return
get_tree().change_scene_to_packed(packed_scene)