1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

added a built-in scene changer API, closes #1928

This commit is contained in:
Juan Linietsky
2015-05-17 16:33:35 -03:00
parent 2696ecb769
commit b6b346e8ae
8 changed files with 128 additions and 4 deletions

View File

@@ -0,0 +1,4 @@
[application]
name="Scene Changer"
main_scene="res://scene_a.scn"

View File

@@ -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

Binary file not shown.

View File

@@ -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

Binary file not shown.