Files
JJBB/Assets/Project/Script/GUI/PVP/PvpRulePanel.cs

50 lines
1.1 KiB
C#
Raw Normal View History

2024-08-23 15:49:34 +08:00
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<int> _SegmentGradeList = null;
void InitPanel()
{
_Desc.text = StrDictionary.GetClientDictionaryString("#{81024}");
if (_SegmentGradeList == null || _SegmentGradeList.Count == 0)
{
_SegmentGradeList = new List<int>();
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);
}
}