using System.Collections; using UnityEngine; using UI.CommonGame; using FairyGUI; using System.Collections.Generic; using System; namespace GFGGame { public class RuleView : BaseWindow { private UI_RuleUI _ui; public override void Dispose() { if (_ui != null) { _ui.Dispose(); _ui = null; } base.Dispose(); } protected override void OnInit() { base.OnInit(); _ui = UI_RuleUI.Create(); this.viewCom = _ui.target; this.viewCom.Center(); this.modal = true; } protected override void OnShown() { base.OnShown(); int id = (int)this.viewData; string content = TextDescArray.Instance.GetCfg(id).text; _ui.m_comContent.m_txtContent.text = content; ViewManager.SetMaskAlpha(0.8f); } protected override void OnHide() { base.OnHide(); ViewManager.SetMaskAlpha(0.6f); } } }