加入很多新内容,这波一块交了

This commit is contained in:
2026-04-08 20:53:41 +08:00
parent d9376833b6
commit 85dfff28dd
128 changed files with 14546 additions and 474 deletions
+43
View File
@@ -0,0 +1,43 @@
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class get_item_prefab : MonoBehaviour
{
public Image item_btm;
public Image itemProfile;
public TextMeshProUGUI itemAmount;
public Text itemName;
public void Bind(Sprite icon, string displayName, int amount, Color qualityColor)
{
if (item_btm != null)
{
item_btm.color = qualityColor;
}
if (itemProfile != null)
{
itemProfile.sprite = icon;
itemProfile.enabled = icon != null;
itemProfile.color = icon != null ? Color.white : new Color(1f, 1f, 1f, 0f);
}
if (itemName != null)
{
itemName.text = displayName ?? string.Empty;
}
if (itemAmount != null)
{
if (amount <= 1)
{
itemAmount.text = string.Empty;
}
else
{
itemAmount.text = amount.ToString();
}
}
}
}