lcy
2025-11-06 09bc892c7283df8757a07b646d5af21ddaa263d1
Main/System/KnapSack/New/ItemCell.cs
@@ -1,76 +1,22 @@
using UnityEngine;
using UnityEngine.UI;
using vnxbqy.UI;
using System.Collections.Generic;
using System;
namespace vnxbqy.UI

public class ItemCell : CommonItemBaisc
{
    public class ItemCell : CommonItemBaisc
    public override void Init(ItemModel model, bool isCompare = false)
    {
        private Button m_Reducebtn;
        public Button reducebtn {
            get {
                if (m_Reducebtn == null)
                {
                    LoadPrefab();
                    m_Reducebtn = this.transform.GetComponent<Button>("Container_ItemCell/Btn_Reduce");
                }
                return m_Reducebtn;
            }
        }
        Image m_AuctionIcon;
        public Image auctionIcon
        if (model == null)
        {
            get
            {
                if (m_AuctionIcon == null)
                {
                    LoadPrefab();
                    m_AuctionIcon = this.transform.GetComponent<Image>("Container_ItemCell/Img_Auction");
                }
                return m_AuctionIcon;
            }
            return;
        }
        base.Init(model, isCompare);
        Image m_TimeMark;
        public Image timeMark
        {
            get
            {
                if (m_TimeMark == null)
                {
                    LoadPrefab();
                    m_TimeMark = this.transform.GetComponent<Image>("Container_ItemCell/Img_Time");
                }
                return m_TimeMark;
            }
        }
    }
        public override void Init(ItemModel model, bool isCompare = false)
        {
            base.Init(model, isCompare);
            reducebtn.SetActive(false);
            auctionIcon.SetActive(false);
            // auctionIcon.SetActive(model.isAuction);
            // if (model.isAuction)
            // {
            //     auctionIcon.SetSprite(ItemLogicUtility.Instance.IsOverdue(model.guid) ? "Item_Auction_3" : "Item_Auction_1");
            // }
    public override void Init(ItemCellModel model)
    {
        base.Init(model);
            timeMark?.SetActive(model.config.Type == 145 && model.config.CDTime > 0);
        }
        public override void Init(ItemCellModel model)
        {
            base.Init(model);
            reducebtn.SetActive(false);
            auctionIcon.SetActive(false);
            timeMark?.SetActive(model.itemConfig.Type == 145 && model.itemConfig.CDTime > 0);
        }
    }
}