//-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, March 11, 2019 //-------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace vnxbqy.UI { public class EquipSetSelect : MonoBehaviour { [SerializeField] Text m_EquipHeadName; [SerializeField] Transform m_ContainerSelect; [SerializeField] Button m_Select; [SerializeField] RedpointBehaviour m_Redpoint; EquipModel equipModel { get { return ModelCenter.Instance.GetModel(); } } int equipLevel = 0; public void Display(int level, bool isSelect, int repointID) { this.equipLevel = level; var equipSet = equipModel.GetEquipSet(level); if (equipSet != null) { var realmConfig = RealmConfig.Get(equipSet.realm); if (realmConfig != null) { //m_EquipHeadName.text = realmConfig.Name; m_EquipHeadName.text = StringUtility.Contact("", realmConfig.NameEx, ""); } } m_ContainerSelect.SetActive(isSelect); m_Select.SetListener(OnSelect); m_Redpoint.redpointId = repointID; } private void OnSelect() { equipModel.SelectFuncSet(equipLevel); //if (strengthModel.SelectLevel == equipLevel) //{ // strengthModel.SelectLevel = -1; //} //else //{ // strengthModel.SelectLevel = equipLevel; //} } } }