diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-05-17 16:33:35 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-05-17 16:33:35 -0300 |
commit | b6b346e8aeaa4b31f4a89b0711e48a08fa802cf5 (patch) | |
tree | 717c932781cff4a0f5da6cd39019ddf33f8679d2 /demos/misc | |
parent | 2696ecb769a5469bd6fabe2efe9a5914d8cd8a6f (diff) |
added a built-in scene changer API, closes #1928
Diffstat (limited to 'demos/misc')
-rw-r--r-- | demos/misc/scene_changer/engine.cfg | 4 | ||||
-rw-r--r-- | demos/misc/scene_changer/scene_a.gd | 17 | ||||
-rw-r--r-- | demos/misc/scene_changer/scene_a.scn | bin | 0 -> 1459 bytes | |||
-rw-r--r-- | demos/misc/scene_changer/scene_b.gd | 17 | ||||
-rw-r--r-- | demos/misc/scene_changer/scene_b.scn | bin | 0 -> 1448 bytes |
5 files changed, 38 insertions, 0 deletions
diff --git a/demos/misc/scene_changer/engine.cfg b/demos/misc/scene_changer/engine.cfg new file mode 100644 index 0000000000..1ba1a41167 --- /dev/null +++ b/demos/misc/scene_changer/engine.cfg @@ -0,0 +1,4 @@ +[application] + +name="Scene Changer" +main_scene="res://scene_a.scn" diff --git a/demos/misc/scene_changer/scene_a.gd b/demos/misc/scene_changer/scene_a.gd new file mode 100644 index 0000000000..956878b0f7 --- /dev/null +++ b/demos/misc/scene_changer/scene_a.gd @@ -0,0 +1,17 @@ + +extends Panel + +# member variables here, example: +# var a=2 +# var b="textvar" + +func _ready(): + # Initalization here + pass + + + + +func _on_goto_scene_pressed(): + get_tree().change_scene("res://scene_b.scn") + pass # replace with function body diff --git a/demos/misc/scene_changer/scene_a.scn b/demos/misc/scene_changer/scene_a.scn Binary files differnew file mode 100644 index 0000000000..61727a57ba --- /dev/null +++ b/demos/misc/scene_changer/scene_a.scn diff --git a/demos/misc/scene_changer/scene_b.gd b/demos/misc/scene_changer/scene_b.gd new file mode 100644 index 0000000000..4f94d6bb8f --- /dev/null +++ b/demos/misc/scene_changer/scene_b.gd @@ -0,0 +1,17 @@ + +extends Panel + +# member variables here, example: +# var a=2 +# var b="textvar" + +func _ready(): + # Initalization here + pass + + + + +func _on_goto_scene_pressed(): + get_tree().change_scene("res://scene_a.scn") + pass # replace with function body diff --git a/demos/misc/scene_changer/scene_b.scn b/demos/misc/scene_changer/scene_b.scn Binary files differnew file mode 100644 index 0000000000..ae09eeff88 --- /dev/null +++ b/demos/misc/scene_changer/scene_b.scn |