using UnityEngine; using System.Collections; using UnityEngine.UI; using System.Collections.Generic; using GCGame.Table; public class WelfarePageBaseCS : MonoBehaviour { public int _NodeId; public virtual void OnDisable() { if (WelfareRootCtr.Instance) { WelfareRootCtr.Instance.ClearShowWin(_NodeId); } } public UIContainerBase _SubNodeContainer; public List _DescLists; public NodePageInfoRet _Packet; public virtual void OnPacketRec(NodePageInfoRet packet) { _NodeId = packet._NodeId; _Packet = packet; InitDesc(packet._NodeDescList); } public void InitDesc(List _StringList) { if(_StringList.Count <= 0) { if(_DescLists != null) { for (int index = 0; index < _DescLists.Count; index++) { _DescLists[index].gameObject.SetActive(false); } } return; } for(int index = 0; index < _DescLists.Count && index < _StringList.Count; index++) { _DescLists[index].gameObject.SetActive(true); _DescLists[index].text = StrDictionary.GetServerDictionaryFormatString(_StringList[index]); } if(_DescLists != null && _DescLists.Count > _StringList.Count) { for(int index = _StringList.Count; index < _DescLists.Count; index++) { _DescLists[index].gameObject.SetActive(false); } } } }