Add audio bus configuration for various sound effects and update main scene reference

This commit is contained in:
2025-05-25 12:57:16 +02:00
parent dd921e3396
commit 5b793736f4
21 changed files with 274 additions and 2 deletions

View File

@@ -142,3 +142,20 @@ func pause_game() -> void:
func resume_game() -> void:
Engine.time_scale = 1
func start_new_game() -> void:
reset_player_state()
player_state["current_level"] = 0
player_state["unlocked_levels"] = [0] # Start with the first level unlocked
get_tree().change_scene_to_packed(level_scenes[0])
func continue_game() -> void:
# todo: load player state from save file
if player_state["current_level"] < level_scenes.size():
get_tree().change_scene_to_packed(level_scenes[player_state["current_level"]])
else:
printerr("No levels unlocked to continue.")