1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Updated tutorial_singletons (markdown)

Juan Linietsky
2015-05-17 17:05:15 -03:00
parent f3d2b15723
commit b39ca5030d

@@ -37,7 +37,8 @@ var player_vars = get_node("/root/playervariables")
### Custom Scene Switcher ### Custom Scene Switcher
This short tutorial will explain how to make a scene switcher by using autoload. For simple scene switching, the [SceneTree.change_scene](class_scenetree#change_scene) suffices (described [previously](tutorial_scene_main_loop#changing-current-scene) ), so this method is for more complex behaviros when switching scenes. This short tutorial will explain how to make a scene switcher by using autoload. For simple scene switching, the [SceneTree.change_scene](class_scenetree#change_scene) method suffices (described [previously](tutorial_scene_main_loop#changing-current-scene) ), so this method is for more complex behaviors when switching scenes.
First download the template from here: [autoload.zip](media/autoload.zip), then open it. First download the template from here: [autoload.zip](media/autoload.zip), then open it.
Two scenes are present, scene_a.scn and scene_b.scn on an otherwise empty project. Each are identical and contain a button connected to a callback for going to the opposite scene. When the project runs, it starts n scene_a.scn. However, this does nothing and pressing the button does not work. Two scenes are present, scene_a.scn and scene_b.scn on an otherwise empty project. Each are identical and contain a button connected to a callback for going to the opposite scene. When the project runs, it starts n scene_a.scn. However, this does nothing and pressing the button does not work.
@@ -140,4 +141,3 @@ Finally, by running the project it's possible to switch bewtween both scenes y p