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 3de54b0428
commit fd05b4c64c
5 changed files with 38 additions and 0 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.