summaryrefslogtreecommitdiff
path: root/demos/misc/scene_changer
diff options
context:
space:
mode:
Diffstat (limited to 'demos/misc/scene_changer')
-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