2023-10-01 21:40:48 +00:00
|
|
|
extends Control
|
2023-10-01 13:15:16 +00:00
|
|
|
class_name GameUI
|
2023-10-01 13:31:49 +00:00
|
|
|
|
2023-10-01 23:36:23 +00:00
|
|
|
@export var score_button: ScoreButton
|
|
|
|
|
2023-10-01 13:31:49 +00:00
|
|
|
## Emitted when the Score button is pressed.
|
|
|
|
signal score_button_pressed
|
|
|
|
|
|
|
|
## Emitted when the Spawn button is pressed.
|
|
|
|
signal spawn_button_pressed
|
|
|
|
|
|
|
|
## Emitted when the Shop button is presesd.
|
|
|
|
signal shop_button_pressed
|
|
|
|
|
|
|
|
|
|
|
|
func _on_score_button_pressed():
|
|
|
|
score_button_pressed.emit()
|
|
|
|
|
|
|
|
func _on_spawn_button_pressed():
|
|
|
|
spawn_button_pressed.emit()
|
|
|
|
|
|
|
|
func _on_shop_button_pressed():
|
|
|
|
shop_button_pressed.emit()
|
2023-10-01 23:36:23 +00:00
|
|
|
|
|
|
|
func _on_game_score_changed(total: int):
|
|
|
|
score_button.set_score(total)
|