- extends Node2D
- @onready var health_bar = $HealthBar
- var direction = -1
- func _process(_delta: float) -> void:
- if Input.is_action_pressed("ui_cancel"):
- get_tree().change_scene_to_file("res://screens/main_menu.tscn")
- func _on_timer_timeout():
- health_bar.health += direction
- if health_bar.health == 0 || health_bar.health == health_bar.MAX_HEALTH:
- direction *= -1
|