浏览代码

Merge remote-tracking branch 'origin/master' into ios

gfg 1 年之前
父节点
当前提交
ad6a984ae4

+ 11 - 11
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/CardGuideView.cs

@@ -14,7 +14,6 @@ namespace GFGGame
     {
         private UI_CardGuideUI _ui;
         private List<int> _cardList;
-        private bool _startInAnim;
         private int _lastClickIndex;
 
         public override void Dispose()
@@ -44,7 +43,6 @@ namespace GFGGame
             _ui.m_listRole.onClickItem.Add(OnClickRoleListItem);
             _ui.m_btnBack.onClick.Add(OnClickBtnBack);
             _ui.m_listRole.selectedIndex = 0;
-            _startInAnim = true;
         }
 
         protected override void AddEventListener()
@@ -67,19 +65,16 @@ namespace GFGGame
         {
             base.OnShown();
             UpdateCardList();
-            if (_startInAnim)
-            {
-                _startInAnim = false;
-                _ui.m_listRole.scrollPane.ScrollTop();
-                _ui.m_In.Play();
-            }
+
+            // 以下代码只在从图鉴进入时才执行
+            ResetSelectedItem();
+            _ui.m_listCard.scrollPane.ScrollTop();
+            _ui.m_In.Play();
         }
 
         protected override void OnHide()
         {
             base.OnHide();
-            _ui.m_listRole.selectedIndex = 0;
-            _lastClickIndex = 0;
         }
 
         private void RenderCardListItem(int index, GObject obj)
@@ -179,8 +174,13 @@ namespace GFGGame
 
         private void OnClickBtnBack()
         {
-            _startInAnim = true;
             Hide();
         }
+
+        private void ResetSelectedItem()
+        {
+            _ui.m_listRole.selectedIndex = 0;
+            _lastClickIndex = 0;
+        }
     }
 }

+ 8 - 2
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleScoreView.cs

@@ -488,7 +488,7 @@ namespace GFGGame
             if (GuideDataManager.IsGuideFinish(ConstGuideId.START_FIGHT) <= 0 && !ViewManager.isViewOpen(typeof(GuideView).FullName)) return;
             Timers.inst.Add(0.1f, 0, ComAllCirclePressTime);
 
-            _effectUI15.GetObj().GetComponent<Animator>().SetBool("player", true);  
+            
         }
         private void ComAllCirclePressTime(object param = null)
         {
@@ -511,11 +511,13 @@ namespace GFGGame
             //_ui.m_comClick.m_comAllPerfect.m_txtCount.text = allCircleScore.ToString();
             CheckNumImage(allCircleScore.ToString());
             _ui.m_comClick.m_comResult.target.visible = false;
-
+            _ui.m_comClick.m_comAllPerfect.m_t2.SetHook("animation", SetAnimation);
+            
             _time = 0;
             _score += allCircleScore;
             _ui.m_comClick.m_comAllPerfect.m_t2.Play(() =>
                 {
+                    _effectUI15.GetObj().GetComponent<Animator>().SetBool("player", false);
                     _prefectCount = 0;
                     TryShowCardSkill(null);
                 });
@@ -526,6 +528,10 @@ namespace GFGGame
                 GuideController.TryCompleteGuide(ConstGuideId.START_FIGHT, 10);
             }
         }
+        private void SetAnimation()
+        {
+            _effectUI15.GetObj().GetComponent<Animator>().SetBool("player", true);
+        }
 
         private bool SuitAddScore()
         {

+ 6 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

@@ -704,7 +704,6 @@ namespace GFGGame
             {
                 _ui.m_comClick.m_comAllPerfect.m_t0.Play();
             }
-            _effectUI12.GetObj().GetComponent<Animator>().SetBool("player", true);
         }
         private void OnComAllCircleClickBegin()
         {
@@ -734,17 +733,21 @@ namespace GFGGame
             //_ui.m_comClick.m_comAllPerfect.m_txtCount.text = allCircleScore.ToString();
             CheckNumImage(allCircleScore.ToString());
             _ui.m_comClick.m_comResult.target.visible = false;
-
+            _ui.m_comClick.m_comAllPerfect.m_t2.SetHook("animation", SetAnimation);
             _time = 0;
             _score += allCircleScore;
             _targetScore += allCircleScore;
             _ui.m_comClick.m_comAllPerfect.m_t2.Play(() =>
                 {
+                    _effectUI12.GetObj().GetComponent<Animator>().SetBool("player", false);
                     _prefectCount = 0;
                     CheckAllPerfectClickSkill();
                 });
         }
-
+        private void SetAnimation()
+        {
+            _effectUI12.GetObj().GetComponent<Animator>().SetBool("player", true);
+        }
         private bool SuitAddScore()
         {
             //评分结束后,添加套装加成分数

二进制
GameClient/Assets/ResIn/UI/League/League_fui.bytes


二进制
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes