extends Control signal back const CHARACTER_SELECT_CARD = preload("res://scene/character_select_card.tscn") @onready var character_add_pos: VFlowContainer = $VBoxContainer/HBoxContainer/margin/HBoxContainer/ScrollContainer/character_add_pos @onready var start: ToolButton = $VBoxContainer/HBoxContainer2/TextureRect/start var now_select_node var now_select_data: set(val): if now_select_node!=null: now_select_node.is_selected=false start.disable(val==null) now_select_data=val var data:Dictionary={ } func _on_back_pressed() -> void: back.emit() pass # Replace with function body. func fresh(): start.disable(true) for i in character_add_pos.get_children(): i.queue_free() for i in Global.system_game_data["unlock_character"]: var new_character=CHARACTER_SELECT_CARD.instantiate() character_add_pos.add_child(new_character) new_character.set_data(Global.get_character_data(i)) new_character.pressed.connect(pressed) func _ready() -> void: fresh() func pressed(data,node,is_select): if is_select: now_select_data=data now_select_node=node else: now_select_data=null now_select_node=null pass func _on_start_pressed() -> void: Global.now_game_data.character_data=now_select_data SceneManager.change_scene_to("res://scene/game_flow.tscn") pass # Replace with function body.