using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
namespace vnxbqy.UI
|
{
|
//商城二级标签
|
public class ShopSecondCell: CellView
|
{
|
[SerializeField] Text m_ClassifyName;
|
[SerializeField] Transform m_ContainerSelect;
|
[SerializeField] Button m_Select;
|
[SerializeField] Image m_SecondIcon;
|
|
StoreModel model { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
|
|
int classifyId = 0;
|
|
public void Display(int id)
|
{
|
classifyId = id;
|
m_ClassifyName.text = Language.Get("ShopSecond_" + id);
|
m_ContainerSelect.SetActive(model.selectSecondType == id);
|
m_SecondIcon.SetSprite("ShopSecond_" + id);
|
m_Select.SetListener(() =>
|
{
|
model.selectSecondType = classifyId;
|
});
|
}
|
}
|
}
|