using FairyGUI; namespace GFGGame { public class RarityIconController { public static void UpdateRarityIcon(GLoader rarityUI, int id, bool isSmall, bool isSuit = false) { string prefix = null; if(isSmall) { prefix = "zx_bq_shuxing_"; } else { prefix = "hz_bq_shuxing_"; } int rarity = 0; if(isSuit) { SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(id); rarity = suitCfg.rarity; } else { ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id); rarity = itemCfg.rarity; } if(rarity > 0) { rarityUI.url = "ui://CommonGame/" + prefix + rarity; rarityUI.visible = true; } else { rarityUI.visible = false; } } } }