/// <summary> /// 设置单个装备数据 /// </summary> /// <param name="data"></param> /// <param name="cell"></param> private void SetEquipmentData(IEquipment data, Transform cell) { TransformUtil.FindUIObject <Transform>(cell, "Content").gameObject.SetActive(data != null); TransformUtil.FindUIObject <Transform>(cell, "Empty").gameObject.SetActive(data == null); if (data != null) { //icon UIUtil.SetIconImage(TransformUtil.FindUIObject <Image>(cell, "Content/Image_Icon"), TableUtil.GetItemIconBundle(data.GetTID()), TableUtil.GetItemIconImage(data.GetTID())); //name TransformUtil.FindUIObject <TMP_Text>(cell, "Content/Label_Name").text = TableUtil.GetItemName((int)data.GetTID()); //quality TransformUtil.FindUIObject <Image>(cell, "Content/Image_Quality").color = ColorUtil.GetColorByItemQuality(data.GetBaseConfig().Quality); //lv TransformUtil.FindUIObject <TMP_Text>(cell, "Content/Label_Lv").text = "Lv." + PadLeft(data.GetLv().ToString()); } }