using System; using UnityEngine; using UnityEngine.UI; namespace vnxbqy.UI { public class HowToPlayWin : Window { [SerializeField] Text m_Title; [SerializeField] Text m_Description; [SerializeField] ScrollRect m_Scroller; [SerializeField] Button m_CloseBtn; [SerializeField] Button m_SureBtn; HowToPlayModel model { get { return ModelCenter.Instance.GetModel(); } } protected override void AddListeners() { m_CloseBtn.AddListener(CloseClick); m_SureBtn.AddListener(CloseClick); } protected override void BindController() { } protected override void OnAfterClose() { } protected override void OnAfterOpen() { this.transform.SetAsLastSibling(); } protected override void OnPreClose() { } protected override void OnPreOpen() { m_Scroller.verticalNormalizedPosition = 1f; var config = RuleConfig.Get(model.ruleId); if (!string.IsNullOrEmpty(config.Title)) { m_Title.text = Language.Get(config.Title); } if (!string.IsNullOrEmpty(config.Description)) { m_Description.text = Language.Get(config.Description); } } } }