//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Tuesday, March 19, 2019
|
//--------------------------------------------------------
|
using UnityEngine;
|
using System.Collections;
|
using UnityEngine.UI;
|
|
namespace Snxxz.UI
|
{
|
|
public class BagItemCell : CommonItemBaisc
|
{
|
Image m_AuctionIcon;
|
public Image auctionIcon {
|
get {
|
if (m_AuctionIcon == null)
|
{
|
m_AuctionIcon = this.transform.GetComponent<Image>("Img_Auction");
|
}
|
return m_AuctionIcon;
|
}
|
}
|
|
/// <summary>
|
/// 初始化数据 bool值用来判断是否需要展示评分高低或者职业限制
|
/// </summary>
|
/// <param name="model"></param>
|
/// <param name="isCompare"></param>
|
public override void Init(ItemModel model, bool isCompare = false)
|
{
|
base.Init(model, isCompare);
|
auctionIcon.gameObject.SetActive(model.isAuction);
|
if (model.isAuction)
|
{
|
auctionIcon.SetSprite(ItemLogicUtility.Instance.IsOverdue(model.guid) ? "Item_Auction_3" : "Item_Auction_1");
|
}
|
}
|
|
/// <summary>
|
/// 初始化数据(预览)
|
/// </summary>
|
/// <param name="model"></param>
|
public override void Init(ItemCellModel model)
|
{
|
base.Init(model);
|
auctionIcon.gameObject.SetActive(false);
|
}
|
|
|
}
|
|
}
|