using System; using UnityEngine; using UnityEngine.UI; using TableConfig; namespace Snxxz.UI { public class SecondPraTypeCell : CellView { [SerializeField] public GameObject unSelectImg; [SerializeField] public GameObject selectImg; [SerializeField] public Text nameText; [SerializeField] public Button cellBtn; [SerializeField] public RedpointBehaviour redpoint; RealmPracticeModel practiceModel { get { return ModelCenter.Instance.GetModel(); } } public void Init(int firstType,int secondType,int selectSecondType = -1) { redpoint.redpointId = practiceModel.realmSecondTypeDict[firstType][secondType].id; nameText.text = practiceModel.GetPracticePointStr(firstType,secondType); if(selectSecondType == secondType) { selectImg.SetActive(true); unSelectImg.SetActive(false); } else { unSelectImg.SetActive(true); selectImg.SetActive(false); } } } }