godot-shooter / commit
"Escape" in web games will just restart the game.
Player.gd | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Player.gd b/Player.gd index 3f2bcec..bc42077 100644 --- a/Player.gd +++ b/Player.gd @@ -16,11 +16,10 @@ var can_fire = true func _process(delta: float) -> void: if Input.is_action_just_pressed("exit"): - var p = PopupControl.instance() - p.message = OS.get_name() - add_child(p) if OS.get_name() == "OSX": get_tree().quit() + else: + restart() if Input.is_action_just_pressed("restart"): restart() if dead: