Add another gym about scene switching
This commit is contained in:
27
docs/gyms/gym09_scene_switching/README.md
Normal file
27
docs/gyms/gym09_scene_switching/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Gym 09 — Scene Switching
|
||||
|
||||
Demonstrates switching between a Dialogic timeline scene and a non-Dialogic gameplay scene.
|
||||
|
||||
## Flow
|
||||
|
||||
```
|
||||
gym09_main.tscn gym09_minigame.tscn
|
||||
┌─────────────────┐ ┌──────────────────┐
|
||||
│ gym09_intro.dtl │ │ Press button 5x │
|
||||
│ ↓ │ │ ↓ │
|
||||
│ [signal] │ ───→ │ set variable │
|
||||
│ │ ←─── │ change_scene back │
|
||||
│ gym09_congrats │ │ │
|
||||
│ .dtl │ └──────────────────┘
|
||||
└─────────────────┘
|
||||
```
|
||||
|
||||
## How to Run
|
||||
|
||||
Open `gym09_main.tscn` in the Godot editor and press **F6** (Run Current Scene).
|
||||
|
||||
## Key Mechanic
|
||||
|
||||
- `Dialogic.VAR.Gym.minigame_done` acts as a flag between scenes
|
||||
- `[signal arg=start_minigame]` triggers `get_tree().change_scene_to_file()`
|
||||
- The controller's `_ready()` checks the flag to know which timeline to start
|
||||
Reference in New Issue
Block a user