ChronoSpace/scenes/upgradeChooser/choice/choice.gd

17 lines
432 B
GDScript

class_name Choice extends MarginContainer
@onready var nameLabel = $VBoxContainer/nameLabel
@onready var description = $VBoxContainer/description
var option: int
signal selected(_option: int)
func setValues(_text: String, _description: String, _option: int) -> void:
nameLabel.text = _text
description.text = _description
option = _option
func _on_button_pressed() -> void:
get_tree().paused = false
selected.emit(option)