2023-10-07 16:10:06 +02:00
|
|
|
extends Control
|
|
|
|
|
2023-10-08 12:45:25 +02:00
|
|
|
signal on_paused()
|
2023-10-07 16:10:06 +02:00
|
|
|
|
|
|
|
func set_resource(value):
|
|
|
|
$Resources/Label.text = str(value)
|
2023-10-07 17:13:27 +02:00
|
|
|
|
|
|
|
func set_damage(value):
|
|
|
|
var health = $Health/GridContainer.get_children()
|
|
|
|
|
|
|
|
for x in range(value):
|
|
|
|
if !health.is_empty():
|
|
|
|
health[len(health) - 1].queue_free()
|
|
|
|
health.pop_back()
|
2023-10-08 12:45:25 +02:00
|
|
|
|
|
|
|
func _on_pause_button_pressed():
|
|
|
|
on_paused.emit()
|