少年修仙传客户端代码仓库
client_Hale
2018-09-29 3a4eb38542bf8cc2cdf7f835a559ade8a8457ea3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//--------------------------------------------------------
//    [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);
        }
    }
 
}