19 lines
318 B
GDScript
19 lines
318 B
GDScript
extends CanvasLayer
|
|
|
|
signal add_currency(amount)
|
|
|
|
|
|
func _on_Add_Currency_pressed() -> void:
|
|
emit_signal('add_currency', 1)
|
|
return
|
|
|
|
|
|
func update_currency(amount: int) -> void:
|
|
$Currency.set_text(String(amount))
|
|
return
|
|
|
|
|
|
func update_health(value: int) -> void:
|
|
$'Health Bar'.value = value
|
|
return
|