Jelajahi Sumber

升级展示优化

zhaoyang 3 tahun lalu
induk
melakukan
7f1a3d69e5

+ 4 - 0
GameClient/Assets/Game/HotUpdate/Data/InstanceZonesDataManager.cs

@@ -16,6 +16,10 @@ namespace GFGGame
         public static int currentCardId = 0;
         //快速挑战挑战次数
         public static int FightTimes = 10;
+        //是否速刷中
+        public static bool isQuicklyFighting = false;
+        //是否结算中
+        public static bool isResultFighting = false;
 
         private static int _currentLevelCfgId;
         //所有副本关卡通用配置表的id

+ 5 - 10
GameClient/Assets/Game/HotUpdate/Data/RoleDataManager.cs

@@ -86,22 +86,17 @@ namespace GFGGame
             Timers.inst.Remove(OpenRoleLvUpView);
 
             Timers.inst.Add(1, 0, CheckUpLv);
+            CheckUpLv(null);
         }
         private static void CheckUpLv(object param)
         {
             if (GuideDataManager.currentGuideId > 0) return;
             if (ViewManager.isViewOpen(typeof(FunctionOpenView).Name)) return;//等功能开启展示完成后再展示角色升级
 
-            if (GRoot.inst.GetTopWindow() == null)
-            {
-                OpenRoleLvUpView(null);
-                Timers.inst.Remove(CheckUpLv);
-            }
-            
-            if (ViewManager.isViewOpen(typeof(StroyFightResultView).Name))
-            {
-                Timers.inst.Add(0.2f, 1, OpenRoleLvUpView);
-            }
+            if (InstanceZonesDataManager.isQuicklyFighting == true) return;//速刷中不弹
+            if (InstanceZonesDataManager.isResultFighting == true) return;//结算中经验进度结束前不弹
+
+            OpenRoleLvUpView(null);
 
         }
         private static void OpenRoleLvUpView(object param)

+ 5 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightQuicklyView.cs

@@ -40,6 +40,7 @@ namespace GFGGame
             _fightType = (int)viewData;
             _levelID = InstanceZonesDataManager.currentLevelCfgId;
 
+            InstanceZonesDataManager.isQuicklyFighting = true;
             StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
             _type = levelCfg.type;
@@ -58,6 +59,8 @@ namespace GFGGame
             EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateBtnFightTimes);
             EventAgent.RemoveEventListener(ConstMessage.STORY_FIGHT_QUICKLY_SUCCESS, StartShowBonus);
             ViewManager.GoBackFrom(typeof(StoryFightQuicklyView).Name);
+            InstanceZonesDataManager.isQuicklyFighting = false;
+
         }
 
         private void StartFight()
@@ -115,6 +118,8 @@ namespace GFGGame
                 UI_StoryFightQuicklyComplete completeItem = UI_StoryFightQuicklyComplete.Proxy();
                 _ui.m_list.AddChild(completeItem.target);
                 Timers.inst.Remove(ShowBonusItem);
+                InstanceZonesDataManager.isQuicklyFighting = false;
+
                 _ui.m_btnExit.visible = true;
                 UpdateBtnFightTimes();
             }

+ 6 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/StroyFightResultView.cs

@@ -76,6 +76,7 @@ namespace GFGGame
                 _sceneObject = GameObject.Instantiate(_scenePrefab);
             }
             InstanceZonesDataManager.usedRecommend = false;
+            InstanceZonesDataManager.isResultFighting = true;
             SceneController.UpdateRole(EquipDataCache.cacher.equipDatas, _sceneObject);
 
             _ui.m_txtScore.text = "" + _resultData.Score;
@@ -104,6 +105,7 @@ namespace GFGGame
                 _ui.m_expBar.m_txtLvlAdded.text = "0";
                 _ui.m_expBar.target.visible = false;
                 _ui.m_btnClose.enabled = true;
+                InstanceZonesDataManager.isResultFighting = false;
             }
             else
             {
@@ -124,6 +126,7 @@ namespace GFGGame
         protected override void OnHide()
         {
             base.OnHide();
+            InstanceZonesDataManager.isResultFighting = false;
             Timers.inst.Remove(AddExp);
             if (_sceneObject != null)
             {
@@ -185,6 +188,9 @@ namespace GFGGame
             GTween.To(_ui.m_expBar.m_pbExp.m_bar.target.width, width, 0.2f).SetTarget(_ui.m_expBar.m_pbExp.m_bar).OnUpdate((GTweener t) =>
                 {
                     _ui.m_expBar.m_pbExp.m_bar.target.width = t.value.x;
+                }).OnComplete(() =>
+                {
+                    InstanceZonesDataManager.isResultFighting = false;
                 }); ;
             // _ui.m_expBar.m_pbExp..TweenValue(exp, 0.2f);
             _ui.m_btnClose.enabled = true;