1
0
Fork 0

fix crash on end level

This commit is contained in:
Manu 2021-04-27 03:19:37 +02:00
parent e31327fa9d
commit 54aa40d7d4
1 changed files with 2 additions and 0 deletions

View File

@ -212,6 +212,8 @@ func end_of_level():
func next_level():
var parent = get_parent()
if next_level:
if "End" in next_level.resource_path:
get_tree().change_scene_to(next_level)
var new = next_level.instance()
parent.add_child(new)
$"/root/Game".new_level(new)