/*------------------------------------------------------------------------------------- --- 创建人: --- 描 述: --- 创建时间: 2023年4月17日 -------------------------------------------------------------------------------------*/ using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TMPro; using CaoCao.Runtime; namespace Game.HotFix { /// /// xx 功能界面 /// public class TipNotRemindAgainUnit : TipChoiceUnit { //UIAutoBuild_CtrlDefine public Toggle tglChoose; //UIAutoBuild_CtrlDefine public new ChoiceData m_Data; public NotRemindAgainType mNotRemindAgainType; public override void Awake() { base.Awake(); //UIAutoBuild_CtrlBind Transform tf = transform; tglChoose = tf.Find("tglChoose").GetComponent(); //UIAutoBuild_CtrlBind tglChoose.isOn = false; mNotRemindAgainType = NotRemindAgainType.None; } public override void OnEnable() { base.OnEnable(); //UIAutoBuild_EventReg tglChoose.onValueChanged.AddListener(OnTglChooseChange); //UIAutoBuild_EventReg } public override void OnDisable() { base.OnDisable(); //UIAutoBuild_EventUnReg tglChoose.onValueChanged.RemoveAllListeners(); //UIAutoBuild_EventUnReg tglChoose.isOn = false; } private void OnTglChooseChange(bool _isOn) { } public override void Refresh(TipData _Data, NotRemindAgainType pType) { base.Refresh(_Data); mNotRemindAgainType = pType; m_Data = (_Data as ChoiceData); } public override void OnBtnYesClick() { //if (tglChoose.isOn && mNotRemindAgainType != NotRemindAgainType.None) //{ // if (HotfixEntry.MainPlayer.myDataSet.mNotRemindAgainList == null) // HotfixEntry.MainPlayer.myDataSet.mNotRemindAgainList = new List(); // var tList = HotfixEntry.MainPlayer.myDataSet.mNotRemindAgainList; // if (!tList.Contains(mNotRemindAgainType)) // { // tList.Add(mNotRemindAgainType); // } //} base.OnBtnYesClick(); } //public override void OnBtnCloseClick() //{ // base.OnBtnCloseClick(); // if (m_Data.m_NoCall != null) // m_Data.m_NoCall(); //} } }