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

40 lines
895 B
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;
public class PvpMatchRulePanel : MonoBehaviour {
public static void OPenUI(string StrID = "#{81029}")
{
UIManager.ShowUI(UIInfo.PvpMatchRulePanel, delegate (bool bSuccess, object param)
{
if (bSuccess && PvpMatchRulePanel.Instance != null)
PvpMatchRulePanel.Instance.SetText(StrID);
});
}
public static PvpMatchRulePanel Instance;
private void Awake()
{
Instance = this;
}
private void OnDestroy()
{
Instance = null;
}
public Text _Rule;
public void SetText(string StrDicID)
{
_Rule.text = GCGame.Table.StrDictionary.GetClientDictionaryString(StrDicID);
}
public void OnCloseBtn()
{
UIManager.CloseUI(UIInfo.PvpMatchRulePanel);
}
}