using System.Collections.Generic; using System.Linq; using UnityEngine; using UnityEngine.UI; public class UI_CheckMyselfPanel : BasePanel { private HashSet validToolNames = new HashSet { "国网安全帽", "绝缘手套", "绝缘靴", "工作服" }; public RectTransform _content; public UI_CheckMyselfItem ui_CheckMySelfItem; public override void ShowMe() { base.ShowMe(); var currentBagDataForTool = GameManager.PacksackBagMgr.GetItemsByE_TMDType(E_ToolOrDeviceOrMaterials.Tool); foreach (var item in currentBagDataForTool.Keys) { if (validToolNames.Contains(item)) { UI_CheckMyselfItem cItem = Instantiate(ui_CheckMySelfItem, _content); cItem.Init(currentBagDataForTool[item][0]); } } if (GameManager.RunModelMgr.ModeType == E_ModeType.Study) { GetControl