diff --git a/player_2d.gd b/player_2d.gd index b23e03e..e66e32b 100644 --- a/player_2d.gd +++ b/player_2d.gd @@ -119,8 +119,10 @@ func _process(delta: float) -> void: if Input.is_action_just_released("restart") or (Input.is_action_pressed("controller_restart_left") and Input.is_action_pressed("controller_restart_right")): get_tree().reload_current_scene() - if Input.is_action_just_released("interact"): - %OldComputer.close() + if %OldComputer.visible: + if Input.is_action_just_released("interact") or Input.is_action_just_released("jump"): + %OldComputer.close() + return if Input.is_action_just_pressed("jump"): %OldComputer.close() @@ -140,9 +142,6 @@ func _process(delta: float) -> void: #velocity.y = 0 #velocity.x = 0 - if %OldComputer.visible: - return - var direction = Input.get_axis("move_left","move_right") if direction < 0: