少年修仙传客户端代码仓库
4970 【前端】【1.3】上古战场增加每次副本活动第一次击杀玩家时出现1斩提示,积分王信息显示调整
2个文件已修改
2个文件已添加
115 ■■■■ 已修改文件
System/Dungeon/AncientKingBehaviour.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/AncientKingBehaviour.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonAncientKingWin.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonFightWin.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/AncientKingBehaviour.cs
New file
@@ -0,0 +1,55 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class AncientKingBehaviour : MonoBehaviour
    {
        [SerializeField] RectTransform m_ContainerBottom;
        [SerializeField] Text m_AncientKingName;
        [SerializeField] Text m_AncientKingPoint;
        [SerializeField] Button m_Func;
        DungeonModel model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
        private void Awake()
        {
            m_Func.onClick.AddListener(OnFunc);
        }
        public void Init()
        {
            model.updateMissionEvent += Display;
            Display();
        }
        public void UnInit()
        {
            model.updateMissionEvent -= Display;
        }
        void Display()
        {
            var _help = model.mission;
            m_ContainerBottom.gameObject.SetActive(!string.IsNullOrEmpty(_help.topName));
            m_AncientKingName.text = _help.topName;
            m_AncientKingPoint.text = UIHelper.ReplaceLargeNum(_help.topScore);
        }
        private void OnFunc()
        {
            if (WindowCenter.Instance.IsOpen<DungeonAncientKingWin>())
            {
                WindowCenter.Instance.CloseImmediately<DungeonAncientKingWin>();
            }
            else
            {
                WindowCenter.Instance.Open<DungeonAncientKingWin>();
            }
        }
    }
}
System/Dungeon/AncientKingBehaviour.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 50a5d844a1eb47c4ab761e97988b3db2
timeCreated: 1543030240
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Dungeon/DungeonAncientKingWin.cs
@@ -13,16 +13,11 @@
    public class DungeonAncientKingWin : Window
    {
        [SerializeField] Text m_AncientKingName;
        [SerializeField] Text m_AncientKingPoint;
        [SerializeField] RectTransform m_ContainerBottom;
        [SerializeField] ItemCell[] m_Items;
        [SerializeField] Button m_Close;
        DungeonModel m_Model;
        DungeonModel model
        {
            get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DungeonModel>()); }
        }
        DungeonModel model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
        #region Built-in
        protected override void BindController()
        {
@@ -35,10 +30,10 @@
        protected override void OnPreOpen()
        {
            model.updateMissionEvent -= UpdateTargets;
            MainInterfaceWin.Event_Duplicates += OnChangeFuncBtnPosEvent;
            UpdateTargets();
            model.updateMissionEvent += DisplayPosition;
            DisplayAward();
            DisplayPosition();
        }
        protected override void OnAfterOpen()
@@ -47,20 +42,14 @@
        protected override void OnPreClose()
        {
            model.updateMissionEvent -= UpdateTargets;
            MainInterfaceWin.Event_Duplicates -= OnChangeFuncBtnPosEvent;
            model.updateMissionEvent -= DisplayPosition;
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
        private void UpdateTargets()
        {
            var _help = model.mission;
            m_AncientKingName.text = _help.topName;
            m_AncientKingPoint.text = UIHelper.ReplaceLargeNum(_help.topScore);
        }
        private void DisplayAward()
        {
@@ -94,6 +83,14 @@
                CloseImmediately();
            }
        }
        private void DisplayPosition()
        {
            var help = model.mission;
            bool hasKing = !string.IsNullOrEmpty(help.topName);
            m_ContainerBottom.localPosition =
                m_ContainerBottom.localPosition.SetY(hasKing ? -127 : -83);
        }
    }
}
System/Dungeon/DungeonFightWin.cs
@@ -27,7 +27,7 @@
        [SerializeField] RectTransform m_ContainerResPoint;
        [SerializeField] RectTransform m_ContainerAncient;
        [SerializeField] Button m_AncientBtn;
        [SerializeField] Button m_AncientKing;
        [SerializeField] AncientKingBehaviour m_AncientKing;
        [SerializeField] DungeonItemCollect m_ItemCollect;
        [SerializeField] DungeonGuardSkyBehaviour m_GuardSky;
        [SerializeField] DungeonBossBriefInfoContainer m_BossInfosContainer;
@@ -58,7 +58,6 @@
        {
            m_ExitDungeon.AddListener(ExitDungeon);
            m_AncientBtn.onClick.AddListener(OnAncientBtn);
            m_AncientKing.onClick.AddListener(AncientKing);
        }
        protected override void OnPreOpen()
@@ -93,6 +92,9 @@
                case ElderGodAreaModel.ELDERGODAREA_MAPID:
                case BossHomeModel.BOSSHOME_MAPID:
                    m_BossInfosContainer.Display(dataMapId);
                    break;
                case 31160:
                    m_AncientKing.Init();
                    break;
                default:
                    break;
@@ -137,6 +139,7 @@
            }
            m_ContainerFuncBtn.localPosition = m_ContainerFuncBottom.localPosition;
            m_BossInfosContainer.Dispose();
            m_AncientKing.UnInit();
            DropItemManager.pickUpCallBack -= OnPickItem;
            MainInterfaceWin.Event_Duplicates -= OnChangeFuncBtnPosEvent;
            model.dungeonCoolDownEvent -= OnLeaveMapTimeEvent;
@@ -327,18 +330,6 @@
            else
            {
                WindowCenter.Instance.Open<DungeonAncientAchieveWin>();
            }
        }
        private void AncientKing()
        {
            if (WindowCenter.Instance.IsOpen<DungeonAncientKingWin>())
            {
                WindowCenter.Instance.CloseImmediately<DungeonAncientKingWin>();
            }
            else
            {
                WindowCenter.Instance.Open<DungeonAncientKingWin>();
            }
        }