| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, September 26, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class UpgradeWin : Window |
| | | { |
| | | [SerializeField] UIAlphaTween m_UIAlphaTween;
|
| | | [SerializeField] ScaleTween m_ScaleTween;
|
| | | [SerializeField] UIAlphaTween m_UIAlphaTween1; |
| | | [SerializeField] GameObject m_Guang; |
| | | [SerializeField] Text m_TextLV; |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | // m_Guang.SetActive(false); |
| | | m_TextLV.text = PlayerDatas.Instance.baseData.LV.ToString(); |
| | | m_UIAlphaTween1.SetEndState(); |
| | |
|
| | |
|
| | | } |
| | | protected override void OnActived()
|
| | | {
|
| | | m_UIAlphaTween.Play(ShowOverAlpha);
|
| | | m_ScaleTween.Play();
|
| | | } |
| | | protected override void OnAfterOpen() |
| | | {
|
| | | |
| | | WindowCenter.Instance.windowBeforeCloseEvent += windowBeforeClose;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;//数据的刷新(h0418) |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | {
|
| | | WindowCenter.Instance.windowBeforeCloseEvent -= windowBeforeClose;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;//数据的刷新(h0418) |
| | | }
|
| | |
|
| | | private void windowBeforeClose(Window _window)
|
| | | {
|
| | | if (_window is MainInterfaceWin)
|
| | | {
|
| | | Close();
|
| | | }
|
| | | }
|
| | |
|
| | | private void Updatefighting(PlayerDataRefresh obj)
|
| | | {
|
| | | if (obj == PlayerDataRefresh.LV)
|
| | | {
|
| | | m_TextLV.text = PlayerDatas.Instance.baseData.LV.ToString();
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | | #endregion |
| | | private void ShowOverAlpha()
|
| | | {
|
| | | m_UIAlphaTween.Play(true);
|
| | | m_UIAlphaTween1.Play(true);
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |