少年修仙传客户端代码仓库
client_Zxw
2018-09-27 7a8ba1cf8da762ed00a1252a4d8c58edb01af549
3870 【前端】角色升级表现修改
2个文件已添加
99 ■■■■■ 已修改文件
System/MainInterfacePanel/UpgradeWin.cs 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/UpgradeWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/UpgradeWin.cs
New file
@@ -0,0 +1,87 @@
//--------------------------------------------------------
//    [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);
        }
    }
}
System/MainInterfacePanel/UpgradeWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 4bcd6e645b0e4dc4fb3359ce209aa612
timeCreated: 1537944869
licenseType: Free
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant: