|
@@ -10,7 +10,13 @@ func _ready() -> void:
|
|
|
|
|
|
func _process(_delta: float) -> void:
|
|
|
if Input.is_action_pressed("ui_cancel"):
|
|
|
- get_tree().change_scene_to_file("res://screens/main_menu.tscn")
|
|
|
+ var tree = get_tree()
|
|
|
+ transition.text = ""
|
|
|
+ transition.slide_in()
|
|
|
+ await transition.game_fully_hidden
|
|
|
+ tree.paused = true
|
|
|
+ tree.change_scene_to_file("res://screens/main_menu.tscn")
|
|
|
+ tree.paused = false
|
|
|
|
|
|
func _on_timer_timeout():
|
|
|
health_bar.health += direction
|