using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using GCGame.Table; public class PvpRulePanel : MonoBehaviour { public static PvpRulePanel Instance; public Text _Desc; private void Awake() { Instance = this; } private void OnDestroy() { Instance = null; } private void Start() { InitPanel(); } public UIContainerBase _ItemContainer; private List _SegmentGradeList = null; void InitPanel() { _Desc.text = StrDictionary.GetClientDictionaryString("#{81024}"); if (_SegmentGradeList == null || _SegmentGradeList.Count == 0) { _SegmentGradeList = new List(); foreach (var tab in TableManager.GetHonorBattlefieldSegment().Values) { if (!_SegmentGradeList.Contains(tab.Segment)) _SegmentGradeList.Add(tab.Segment); } } _ItemContainer.InitContentItem(_SegmentGradeList); } public void OnCloseBtn() { UIManager.CloseUI(UIInfo.PvpRulePanel); } }