在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
local components_url_tree = {main_wid = { left_part = { purple_flag = { purple_flag_title = {}, }, talisman_name_bg = { talisman_name = {}, }, talisman_sv_container = { cell_tmp = {}, }, model_container = {}, process_bar_bg = { process_title = {}, process_bar = { process_value = {}, }, }, talisman_active_btn = { talisman_active_btn_title = {}, }, auto_boost_check = { auto_boost_mask = {}, }, autuo_boost_msg = {}, unactive_notice_msg = { unactive_note1 = {}, unactive_note2 = {}, unactive_note3 = {}, unactive_note4 = {}, }, fight_value_bar = {}, }, right_part = { talisman_btn_container = { nomal_talisman_btn = {}, nomal_talisman_btn_title = {}, huodong_talisman_btn = {}, huodong_talisman_btn_title = {}, }, talisman_profit_info_container = { profit_title_container = { profit_title_bg = { profit_title = {}, }, }, attr_info_container = { property_title1 = {}, property_title2 = {}, property_title3 = {}, property_title4 = {}, total_property_val1 = {}, total_property_val2 = {}, total_property_val3 = {}, total_property_val4 = {}, boost_property_val1 = {}, boost_property_val2 = {}, boost_property_val3 = {}, boost_property_val4 = {}, }, talisman_skill_container = { talisman_skill_title_bg = { talisman_skill_title = {}, }, }, talisman_skill_img_container = { talisman_skill_img = {}, }, talisman_boost_meta_title_container = { meta_title_bg = { meta_title = {}, }, }, talisman_meta_info_container = { item_container1 = {}, item_container2 = {}, item_container3 = {}, talisman_boost_up_btn = { talisman_boost_up_btn_title = {}, }, talisman_boost_once_btn = { talisman_boost_once_btn_title = {}, }, }, }, }, }, } local components_needs_type_tree = { purple_flag_title = TUILabel, talisman_name = TUILabel, question_btn = TUIButton, huodong_spirit_sv_container = TUIWidget, cell_tmp = TUIWidget, model_container = TUIWidget, process_bar_bg = TUISprite, process_title = TUILabel, process_bar = TUISprite, process_value = TUILabel, talisman_active_btn = TUIButton, talisman_active_btn_title = TUILabel, auto_boost_check = TUIButton, auto_boost_mask = TUISprite, autuo_boost_msg = TUILabel, unactive_notice_msg = TUIWidget, unactive_note1 = TUILabel, unactive_note2 = TUILabel, unactive_note3 = TUILabel, unactive_note4 = TUILabel, fight_value_bar = TUISprite, nomal_talisman_btn = TUIButton, nomal_talisman_btn_title = TUILabel, huodong_talisman_btn = TUIButton, huodong_talisman_btn_title = TUILabel, profit_title = TUILabel, property_title1 = TUILabel, property_title2 = TUILabel, property_title3 = TUILabel, property_title4 = TUILabel, total_property_val1 = TUILabel, total_property_val2 = TUILabel, total_property_val3 = TUILabel, total_property_val4 = TUILabel, boost_property_val1 = TUILabel, boost_property_val2 = TUILabel, boost_property_val3 = TUILabel, boost_property_val4 = TUILabel, talisman_skill_title = TUILabel, talisman_skill_img = TUIWidget, meta_title = TUILabel, item_container1 = TUIWidget, item_container2 = TUIWidget, item_container3 = TUIWidget, talisman_boost_up_btn = TUIButton, talisman_boost_up_btn_title = TUILabel, talisman_boost_once_btn = TUIButton, talisman_boost_once_btn_title = TUILabel, } local url_tab = {} function SearchingTree(ComponentsUrlTree) for k, v in pairs(ComponentsUrlTree) do url_tab[#url_tab + 1] = k local url_str = table.concat(url_tab, "/") print(url_str) if components_needs_type_tree[k] ~= nil then local url_str = table.concat(url_tab, "/") local com_type = components_needs_type_tree[k] -- self[k] = self:FindChild(url_str):GetComponent(com_type) end SearchingTree(v) url_tab[#url_tab] = nil end end SearchingTree(components_url_tree) |
请发表评论