Browse Source

战斗报错处理

zhangyuqian 1 year ago
parent
commit
2540ebc4de

+ 15 - 7
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

@@ -340,6 +340,11 @@ namespace GFGGame
             _currentTime = SkillBeginTime.FIGHT_BEGIN;
             UpdateSkill0();
         }
+
+        private void CheckPartFightBeginSkillTimers(object param = null)
+        {
+            CheckPartFightBeginSkill();
+        }
         private void CheckPartFightBeginSkill()
         {
             _skillScore = 0;
@@ -458,10 +463,7 @@ namespace GFGGame
                 case SkillBeginTime.PERFECT_CLICK:
                     if (_skillScore < 0)
                     {
-                        Timers.inst.Add(0.3f, 1, (object param) =>
-                        {
-                            PartScoreResultStart(ClickType.PERFECT_CLICK);
-                        });
+                        Timers.inst.Add(0.3f, 1, PartScorePerectStartTimers);
                     }
                     else
                     {
@@ -530,6 +532,11 @@ namespace GFGGame
             }
         }
 
+        private void PartScorePerectStartTimers(object param = null)
+        {
+            PartScoreResultStart(ClickType.PERFECT_CLICK);
+        }
+
         private void PartScoreResultStart(int clickType)
         {
             Debug.Log("_partId:" + _partId);
@@ -643,7 +650,7 @@ namespace GFGGame
             }
             else
             {
-                Timers.inst.Add(ConstScoreSystem.REFRESH_CIRCLE_WITE_TIME / FightDataManager.Instance.fightSpeed, 1, (object param) => { CheckPartFightBeginSkill(); });//下个部分评分
+                Timers.inst.Add(ConstScoreSystem.REFRESH_CIRCLE_WITE_TIME / FightDataManager.Instance.fightSpeed, 1, CheckPartFightBeginSkillTimers);//下个部分评分
             }
         }
 
@@ -829,8 +836,6 @@ namespace GFGGame
             }
 
             Timers.inst.Remove(CheckGuide);
-
-            Timers.inst.Remove(UpdateProgressA);
         }
 
         private async void Skip(object param = null)
@@ -855,6 +860,9 @@ namespace GFGGame
             // Timers.inst.Remove(SkillScoreStart);
             Timers.inst.Remove(Skip);
             Timers.inst.Remove(ComAllCirclePressTime);
+            Timers.inst.Remove(UpdateProgressA);
+            Timers.inst.Remove(CheckPartFightBeginSkillTimers);
+            Timers.inst.Remove(PartScorePerectStartTimers);
             GTween.Kill(_ui.m_proScore.m_comBar);
 
             _ui.m_t1.Stop(true, false);