mtd/hero_select_card.gd

21 lines
426 B
GDScript3
Raw Normal View History

2023-12-09 01:09:12 +11:00
extends PanelContainer
2024-02-22 06:22:22 +11:00
signal pressed(hero_class: int)
signal button_mouse_entered()
2023-12-09 01:09:12 +11:00
var hero_class: HeroClass
2024-02-22 06:22:22 +11:00
func set_hero(hero: HeroClass) -> void:
2023-12-09 01:09:12 +11:00
hero_class = hero
$VBoxContainer/Label.text = hero.hero_name
$VBoxContainer/TextureRect.texture = hero.texture
func _on_button_pressed() -> void:
2024-03-23 22:36:19 +11:00
pressed.emit(Data.characters.find(hero_class))
func _on_button_mouse_entered() -> void:
button_mouse_entered.emit()