From 39001a600fcae2bcf27c225df8752d75fb92fef4 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 31 十月 2025 11:18:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/KnapSack/Logic/PackGirdCell.cs | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/Main/System/KnapSack/Logic/PackGirdCell.cs b/Main/System/KnapSack/Logic/PackGirdCell.cs
index 16b5df8..d56381c 100644
--- a/Main/System/KnapSack/Logic/PackGirdCell.cs
+++ b/Main/System/KnapSack/Logic/PackGirdCell.cs
@@ -1,4 +1,5 @@
锘縰sing UnityEngine;
+using UnityEngine.UI;
/// <summary>
/// 鑳屽寘鏍煎瓙
@@ -6,12 +7,29 @@
public class PackGirdCell : MonoBehaviour
{
[SerializeField] ItemCell itemCell;
- [SerializeField] RedpointBehaviour redPoint; // 姝ゅ绾㈢偣鍙互鐢ㄥ浘鐗囪〃绀�
+ [SerializeField] Image redPoint; // 鐢ㄥ浘鏍囦唬鏇跨畝鍖朓D绠$悊
public void Display(int index)
{
var guid = PackManager.Instance.GetSinglePack(PackType.Item).itemGuidList[index];
if (string.IsNullOrEmpty(guid))
return;
- itemCell.Init(PackManager.Instance.GetItemByGuid(guid));
+
+ var item = PackManager.Instance.GetItemByGuid(guid);
+
+ itemCell.Init(item);
+ itemCell.button.AddListener(() =>
+ {
+ ItemTipUtility.Show(guid);
+ });
+
+ var chestConfig = ChestsConfig.Get(item.itemId);
+ if (chestConfig != null && chestConfig.ExpendItemID == 0 && chestConfig.OpenMoney == 0)
+ {
+ redPoint.SetActive(true);
+ }
+ else
+ {
+ redPoint.SetActive(false);
+ }
}
}
--
Gitblit v1.8.0