added level restart function

This commit is contained in:
pennyrigate 2023-01-16 03:19:06 -05:00
parent 18f5b28295
commit 3247a67e96
12 changed files with 206 additions and 40 deletions

View file

@ -40,8 +40,7 @@ func _physics_process(delta):
console.visible = !console.visible
#Restart scene
if Input.is_action_just_pressed("debug_restart"):
Game.lives = -1
Game.get_map().get_node("Player").die()
Game.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()