changed change scene to file to call deffered so the current process ends before changing the scene
This commit is contained in:
@@ -8,8 +8,9 @@ func _ready() -> void:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func ChangeSceneNewGame():
|
||||||
|
get_tree().change_scene_to_file("res://Scenes/Levels/office.tscn")
|
||||||
|
|
||||||
func _on_new_game_button_pressed() -> void:
|
func _on_new_game_button_pressed() -> void:
|
||||||
get_tree().change_scene_to_file("res://Scenes/Levels/office.tscn")
|
call_deferred("ChangeSceneNewGame")
|
||||||
print("changed")
|
|
||||||
pass # Replace with function body.
|
pass # Replace with function body.
|
||||||
|
|||||||
Reference in New Issue
Block a user