challenge-editor/scene/fight_card.gd

12 lines
239 B
GDScript3
Raw Normal View History

2024-09-24 11:59:54 +08:00
extends TextureRect
@onready var n: Label = $n
@onready var icon: TextureRect = $icon
var data:Dictionary
func set_card(id:String):
data=Global.get_card_data(id)
icon.texture=Global.get_texture(data["icon"])
n.text=data["name"]
pass