summaryrefslogtreecommitdiff
path: root/demos/misc
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-05-17 16:33:35 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-05-17 16:33:35 -0300
commitb6b346e8aeaa4b31f4a89b0711e48a08fa802cf5 (patch)
tree717c932781cff4a0f5da6cd39019ddf33f8679d2 /demos/misc
parent2696ecb769a5469bd6fabe2efe9a5914d8cd8a6f (diff)
added a built-in scene changer API, closes #1928
Diffstat (limited to 'demos/misc')
-rw-r--r--demos/misc/scene_changer/engine.cfg4
-rw-r--r--demos/misc/scene_changer/scene_a.gd17
-rw-r--r--demos/misc/scene_changer/scene_a.scnbin0 -> 1459 bytes
-rw-r--r--demos/misc/scene_changer/scene_b.gd17
-rw-r--r--demos/misc/scene_changer/scene_b.scnbin0 -> 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
new file mode 100644
index 0000000000..61727a57ba
--- /dev/null
+++ b/demos/misc/scene_changer/scene_a.scn
Binary files differ
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
new file mode 100644
index 0000000000..ae09eeff88
--- /dev/null
+++ b/demos/misc/scene_changer/scene_b.scn
Binary files differ