added a built-in scene changer API, closes #1928
This commit is contained in:
parent
3de54b0428
commit
fd05b4c64c
|
@ -0,0 +1,4 @@
|
||||||
|
[application]
|
||||||
|
|
||||||
|
name="Scene Changer"
|
||||||
|
main_scene="res://scene_a.scn"
|
|
@ -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.
|
@ -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.
Loading…
Reference in New Issue