some ui improvements

This commit is contained in:
2023-12-09 01:09:12 +11:00
parent e97bf84612
commit 7dd8f88ca7
35 changed files with 408 additions and 216 deletions

15
charselect.gd Normal file
View File

@@ -0,0 +1,15 @@
extends Control
class_name HeroSelector
signal hero_selected(hero_class)
@export var hero_card_scene: PackedScene
@export var hbox: HBoxContainer
func _ready() -> void:
for hero in Data.characters:
var card = hero_card_scene.instantiate()
card.set_hero(hero)
card.pressed.connect(func(x): hero_selected.emit(Data.characters.find(x)))
hbox.add_child(card)