add logging
This commit is contained in:
@@ -18,7 +18,7 @@ func start_game_with_mode(gameplay_mode: String) -> void:
|
||||
pending_gameplay_mode = gameplay_mode
|
||||
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)
|
||||
DebugManager.log_error("Failed to load Game scene at: %s" % GAME_SCENE_PATH, "GameManager")
|
||||
return
|
||||
get_tree().change_scene_to_packed(packed_scene)
|
||||
# Wait one frame for the scene to be ready, then set gameplay mode
|
||||
@@ -27,14 +27,13 @@ func start_game_with_mode(gameplay_mode: String) -> void:
|
||||
get_tree().current_scene.set_gameplay_mode(pending_gameplay_mode)
|
||||
|
||||
func save_game() -> void:
|
||||
print("Game saved (mock)")
|
||||
DebugManager.log_info("Game saved (mock)", "GameManager")
|
||||
|
||||
func exit_to_main_menu() -> void:
|
||||
print("GameManager: Attempting to exit to main menu")
|
||||
DebugManager.log_info("Attempting to exit to main menu", "GameManager")
|
||||
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)
|
||||
DebugManager.log_error("Failed to load Main scene at: %s" % MAIN_SCENE_PATH, "GameManager")
|
||||
return
|
||||
print("GameManager: Loading main scene")
|
||||
DebugManager.log_info("Loading main scene", "GameManager")
|
||||
get_tree().change_scene_to_packed(packed_scene)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user