mirror of
https://github.com/Relintai/pandemonium_demo_projects.git
synced 2024-12-21 13:56:50 +01:00
15 lines
310 B
GDScript3
15 lines
310 B
GDScript3
|
extends Button
|
||
|
|
||
|
export(String, FILE) var scene_to_change_to = null
|
||
|
|
||
|
|
||
|
func _ready():
|
||
|
# warning-ignore:return_value_discarded
|
||
|
connect("pressed", self, "change_scene")
|
||
|
|
||
|
|
||
|
func change_scene():
|
||
|
if scene_to_change_to != null:
|
||
|
# warning-ignore:return_value_discarded
|
||
|
get_tree().change_scene(scene_to_change_to)
|