using UnityEngine; using UnityEngine.UI; namespace vnxbqy.UI { public class FindTreasureCell : CellView { [SerializeField] GameObject selectImg; [SerializeField] GameObject unSelectImg; [SerializeField] Text nameText; [SerializeField] public Button titleBtn; [SerializeField] RedpointBehaviour redpoint; TreasureFindHostModel hostModel { get { return ModelCenter.Instance.GetModel(); } } public void SetModel(int treasureId,int selectId) { TreasureConfig config = TreasureConfig.Get(treasureId); if (config == null) return; redpoint.redpointId = hostModel.GetTreasureCellRedIdById(treasureId); nameText.text = config.Name; if(selectId == treasureId) { selectImg.SetActive(true); unSelectImg.SetActive(false); } else { selectImg.SetActive(false); unSelectImg.SetActive(true); } } } }