public void Show(ExtendedItemData item) { gameObject.SetActive(true); var rarityColor = item.GetRarityColor(); MagicBG.enabled = item.IsMagic(); MagicBG.color = rarityColor; NameText.text = Localization.instance.Localize(item.GetDecoratedName()); Description.text = Localization.instance.Localize(item.GetTooltip()); Icon.sprite = item.GetIcon(); _audioSource.PlayOneShot(EpicLoot.GetMagicItemDropSFX(item.GetRarity())); }
public void Show(ItemDrop.ItemData item) { gameObject.SetActive(true); var rarityColor = item.IsMagic() ? item.GetRarityColor() : Color.white; if (MagicBG != null) { MagicBG.enabled = item.IsMagic(); MagicBG.color = rarityColor; } if (EpicLoot.HasAuga) { Auga.API.ComplexTooltip_SetItem(gameObject, item); EpicLoot.ExtendAugaTooltipForMagicItem(gameObject, item); } if (NameText != null) { NameText.text = Localization.instance.Localize(item.GetDecoratedName()); } if (Description != null) { Description.text = Localization.instance.Localize(item.GetTooltip()); } if (Icon != null) { Icon.sprite = item.GetIcon(); } if (item.IsMagic()) { _audioSource.PlayOneShot(EpicLoot.GetMagicItemDropSFX(item.GetRarity())); } }