fix erreur
This commit is contained in:
parent
705399271d
commit
eb791059cd
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ var player
|
|||
|
||||
func transition_to_scene(new_scene: PackedScene, spawn_location = Vector2(0,0), spawn_direction = 1):
|
||||
#screen_transition.play('FadeToBlack')
|
||||
if(current_scene.get_child(0)):
|
||||
if(current_scene.get_child_count() > 0 and current_scene.get_child(0)):
|
||||
current_scene.get_child(0).queue_free()
|
||||
current_scene.add_child(new_scene.instantiate())
|
||||
|
||||
|
|
Loading…
Reference in a new issue