challenge-editor/scene/fight_card.gd
2024-10-04 18:08:33 +08:00

12 lines
230 B
GDScript

extends TextureRect
@onready var n: Label = $n
@onready var icon: TextureRect = $icon
var data:Dictionary
func set_data(_data:Dictionary):
data=_data
icon.texture=Database.get_texture(_data["icon"])
n.text=data["name"]
pass