extends TextureRect var is_selected:bool=false: set(val): if val!=is_selected: if val: %select_texture.show() else: %select_texture.hide() pass is_selected=val @onready var texture_face: TextureRect = %texture_face @onready var star_group=[$mask/HBoxContainer/HBoxContainer/TextureRect, $mask/HBoxContainer/HBoxContainer/TextureRect2, $mask/HBoxContainer/HBoxContainer/TextureRect3, $mask/HBoxContainer/HBoxContainer/TextureRect4, $mask/HBoxContainer/HBoxContainer/TextureRect5] @onready var n: Label = %n func set_star_num(num:int): for i in star_group.size(): if i void: is_selected=!is_selected pressed.emit(data.duplicate(),self,is_selected) pass # Replace with function body. func _ready() -> void: #set_data(Global.get_character_data("test_character_01")) pass func set_data(_data:Dictionary): data=_data var skin_data=data["character"]["skin"][data["character"]["skin_now_use"]] texture_face.texture=Global.get_texture(skin_data["card_face"]) set_star_num(data["character"]["star"]) n.text=data["character"]["name"] pass