装备系统完结,修复并加入很多

This commit is contained in:
FloatGaming
2026-04-03 19:15:02 +08:00
parent 538085b64f
commit d9376833b6
378 changed files with 62464 additions and 16756 deletions
@@ -0,0 +1,48 @@
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class bagItemPreviewPrefab : MonoBehaviour
{
public Image btm_img;
public Image profileImage;
public Text itemName;
public Text itemToUsing;
public Text itemDescription;
public TextMeshProUGUI itemAmount;
public void Bind(Color backgroundColor, Sprite icon, string displayName, string usage, string description, string amountText)
{
if (btm_img != null)
{
btm_img.color = backgroundColor;
}
if (profileImage != null)
{
profileImage.sprite = icon;
profileImage.enabled = icon != null;
profileImage.color = Color.white;
}
if (itemName != null)
{
itemName.text = displayName ?? string.Empty;
}
if (itemToUsing != null)
{
itemToUsing.text = usage ?? string.Empty;
}
if (itemDescription != null)
{
itemDescription.text = description ?? string.Empty;
}
if (itemAmount != null)
{
itemAmount.text = amountText ?? string.Empty;
}
}
}