少年修仙传客户端代码仓库
5196 【前端】【1.3.100】boss争夺战继续争夺按钮代码优化,图片根据聊天框上下移动进行变化
3个文件已修改
26 ■■■■ 已修改文件
System/Chat/ChatTip.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/ExperienceOpenWin.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/MainInterfaceWin.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatTip.cs
@@ -42,7 +42,7 @@
        }
    }
    public event Action OnChatUpEvent;
    public static event Action OnChatUpEvent;
    private Image chatBg;
    private ScrollerController chatUpCtrl;
@@ -53,6 +53,9 @@
    static StringBuilder sb = new StringBuilder();
    public Vector2 chatLowSize { get { return m_ChatLowSize; } }
    public Vector2 chatHighSize { get { return m_ChatHighSize; } }
    void InitCom()
    {
        chatBg = this.GetComponent<Image>("Image");
System/MainInterfacePanel/ExperienceOpenWin.cs
@@ -42,7 +42,7 @@
            billionsExperience = 0;
            unitExperience = 0;
            PlayerMainDate.Event_Experience += OnExperience;
            ChatTip.Inst.OnChatUpEvent += OnChatUpEvent;
            ChatTip.OnChatUpEvent += OnChatUpEvent;
            PositionModification(ChatTip.Inst.IsChatUp);
        }
@@ -55,7 +55,7 @@
        protected override void OnPreClose()
        {
            PlayerMainDate.Event_Experience -= OnExperience;
            ChatTip.Inst.OnChatUpEvent -= OnChatUpEvent;
            ChatTip.OnChatUpEvent -= OnChatUpEvent;
        }
        protected override void OnAfterClose()
System/MainInterfacePanel/MainInterfaceWin.cs
@@ -86,6 +86,8 @@
        [SerializeField] Button WishingAwardImg;
        [SerializeField] Button MysticalPurchaseImg;
        [SerializeField] Button DungeonAssistImg;
        [SerializeField] RectTransform m_ContainerGotoGrabBoss;
        [SerializeField] RectTransform m_ContainerAdaptiveChat;
        [SerializeField] Button m_GotoFairyGrabBoss;
        [SerializeField] Button m_FlyToFairyGrabBoss;
@@ -247,6 +249,7 @@
            assistModel.UpdateRedpointEvent += UpdateDungeonAssistImag;
            purchaseModel.UpdateNewMysticalEvent += UpdateMysticalPurchaseImag;
            fairyGrabBossModel.gotoBossStateUpdate += ShowFairyGrabBoss;
            ChatTip.OnChatUpEvent += RefreshAdaptiveChat;
        }
        private void CompletionOfTaskEvent(int obj)
@@ -259,6 +262,7 @@
        {
            m_HighSettingTip.OnActived();
            IsShowTaskPanel();//是否显示任务面板
            RefreshAdaptiveChat();
        }
        IEnumerator Co_Load()
@@ -416,6 +420,7 @@
            RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
            NewBieCenter.Instance.guideBeginEvent -= GuideBeginEvent;
            fairyGrabBossModel.gotoBossStateUpdate -= ShowFairyGrabBoss;
            ChatTip.OnChatUpEvent -= RefreshAdaptiveChat;
            if (WindowCenter.Instance.IsOpen<FunctionForecastWin>())
            {
                WindowCenter.Instance.CloseImmediately<FunctionForecastWin>();
@@ -1170,7 +1175,7 @@
        private void ShowFairyGrabBoss()
        {
            m_GotoFairyGrabBoss.gameObject.SetActive(fairyGrabBossModel.cacheGotoBossId != 0 &&
            m_ContainerGotoGrabBoss.gameObject.SetActive(fairyGrabBossModel.cacheGotoBossId != 0 &&
                !fairyGrabBossModel.grabBossHintOpen);
        }
@@ -1264,6 +1269,16 @@
                    break;
            }
        }
        private void RefreshAdaptiveChat()
        {
            if (ChatTip.Inst == null)
            {
                return;
            }
            m_ContainerAdaptiveChat.sizeDelta = m_ContainerAdaptiveChat.sizeDelta.SetY(
                ChatTip.Inst.IsChatUp ? ChatTip.Inst.chatHighSize.y : ChatTip.Inst.chatLowSize.y);
        }
    }
}