restart level call deferred

This commit is contained in:
pennyrigate 2023-01-16 03:34:47 -05:00
parent 3247a67e96
commit 88b4135315
5 changed files with 20 additions and 21 deletions

View file

@ -40,7 +40,7 @@ func _physics_process(delta):
console.visible = !console.visible
#Restart scene
if Input.is_action_just_pressed("debug_restart"):
Game.restart_level()
Game.call_deferred("restart_level")
#Move player to mouse
if Input.is_action_pressed("debug_move_player"):
Game.get_map().get_node("Player").position = get_viewport().get_mouse_position()