| using UnityEngine; | 
| using UnityEngine.UI; | 
| public class FuncRules : MonoBehaviour | 
| { | 
|     [SerializeField] Button m_Button; | 
|     [SerializeField] int m_RuleId; | 
|   | 
|   | 
|     private void Awake() | 
|     { | 
|         m_Button.AddListener(OpenRuleWin); | 
|     } | 
|   | 
|     private void OpenRuleWin() | 
|     { | 
|         var rule = RuleConfig.Get(m_RuleId); | 
|         if (!UIManager.Instance.IsOpened<FuncRuleWin>()) | 
|         { | 
|             UIManager.Instance.OpenWindow<FuncRuleWin>(m_RuleId); | 
|         } | 
|     } | 
|   | 
|   | 
| } |