Quellcode durchsuchen

修改活动主界面图标红点位置;优化剧情头像的显示

leiyasi vor 1 Jahr
Ursprung
Commit
fb6e9fe624

+ 13 - 2
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryDialogView.cs

@@ -8,6 +8,7 @@ using System;
 using YooAsset;
 using GFGGame.Launcher;
 using UnityEngine.UI;
+using System.Threading.Tasks;
 
 namespace GFGGame
 {
@@ -514,10 +515,10 @@ namespace GFGGame
                 if (!string.IsNullOrEmpty(headAniRes) || storyDialogCfg.suitId > 0)
                 {
                     //显示对话框半身像
-                    _ui.m_dialogHead.target.visible = true;
                     _ui.m_dialogHead.m_txtName.text = roleName;
                     _ui.m_dialogHead.m_comphead.m_head.visible = false;
                     _ui.m_dialogHead.m_comphead.m_holder.visible = true;
+                    _ui.m_dialogHead.m_txtContent.text = "";
 
                     var headAniCfg = HeadAniCfgArray.Instance.GetCfg(headAniRes);
                     if (headAniCfg != null && !string.IsNullOrEmpty(headAniCfg.headAni))
@@ -530,7 +531,6 @@ namespace GFGGame
                     else
                     {
                         //换装
-                        _ui.m_dialogHead.m_compDressUp.target.visible = true;
                         _ui.m_dialogHead.m_comphead.target.visible = false;
                         
                         //_dressUpObjUI.ResetSceneObj(80, true, false, sceneObject.transform.Find("Scene").gameObject, false);
@@ -554,7 +554,9 @@ namespace GFGGame
                             _dressUpObj.AddOrRemove(headAniCfg.faceId, true);
                             //_dressUpObjUI.UpdateWrapper(_ui.m_dialogHead.m_compDressUp.m_holder);
                         }
+                        ShowSelfHeadImg();
                     }
+                    _ui.m_dialogHead.target.visible = true;
                     _wordTextField = _ui.m_dialogHead.m_txtContent;
                     _arrow = _ui.m_dialogHead.m_iconNext;
                     lastTextFieldType = "head";
@@ -648,7 +650,16 @@ namespace GFGGame
                 //    OnStepComplete();
                 //}
             }
+        }
 
+        /// <summary>
+        /// 延迟显示头像,防止换装异步加载/换表情 未完成时显示了头像
+        /// </summary>
+        private async void ShowSelfHeadImg()
+        {
+            _ui.m_dialogHead.m_compDressUp.target.visible = false;
+            await Task.Delay(10);
+            _ui.m_dialogHead.m_compDressUp.target.visible = true;
         }
 
         private void ShowNextDialog()

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -927,7 +927,7 @@ namespace GFGGame
             if (_ui.m_btnTea.target.visible)
             {
                 if (redPointUpdateFrame == 19)
-                    RedDotController.Instance.SetComRedDot(_ui.m_btnTea.target, ActivityTeaDataManager.Instance.GetRewardRed(), "", -43, 2);
+                    RedDotController.Instance.SetComRedDot(_ui.m_btnTea.target, ActivityTeaDataManager.Instance.GetRewardRed(), "", -8, -1);
             }
 
             redPointUpdateFrame++;