Add another gym about scene switching

This commit is contained in:
2026-06-17 00:23:25 +02:00
parent 99a7068e12
commit 00cc70df12
14 changed files with 308 additions and 0 deletions

View File

@@ -20,6 +20,13 @@ func _ready() -> void:
# Connect to variable changes to watch for demo variables
Dialogic.VAR.variable_changed.connect(_on_variable_changed)
# Check if we're returning from the gym09 minigame
if Dialogic.VAR.Gym.minigame_done:
print("[Gym Controller] Returning from minigame — starting congrats timeline.")
Dialogic.VAR.Gym.minigame_done = false
Dialogic.start("gym09_congrats")
return
# Start the hub timeline
Dialogic.start(start_timeline)
@@ -49,6 +56,14 @@ func _on_dialogic_signal(argument: Variant) -> void:
Dialogic.end_timeline()
Dialogic.start_timeline("gym_pattern4_signal_target")
elif argument is String and argument == "start_minigame":
# Gym 09: Scene switching demo
# Store the return path so the minigame knows where to come back to
Dialogic.VAR.Gym.minigame_return = "hub"
print("[Gym Controller] Signal 'start_minigame' — switching to minigame scene.")
await get_tree().create_timer(0.3).timeout
get_tree().change_scene_to_file("res://docs/gyms/gym09_scene_switching/gym09_minigame.tscn")
#endregion