Pārlūkot izejas kodu

创建新号时清除战斗保存的加速数据

huangxiaoyue 1 gadu atpakaļ
vecāks
revīzija
b08a8b2016

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -307,6 +307,7 @@ namespace GFGGame
             TaskDataManager.Instance.Clear();
             LeagueDataManager.Instance.Clear();
             ActivityAfuGiftDataManager.Instance.Clear();
+            FightDataManager.Instance.Clear();
             GameGlobal.zoneScene.GetComponent<SessionComponent>()?.Disconnect();
             GameGlobal.zoneScene.GetComponent<ServerInfosComponent>()?.ServerInfoList?.Clear();
             GameGlobal.zoneScene.GetComponent<AccountInfoComponent>()?.Clear();

+ 8 - 0
GameClient/Assets/Game/HotUpdate/Data/FightDataManager.cs

@@ -25,6 +25,14 @@ namespace GFGGame
         //     }
         // }
 
+        public void Clear()
+        {
+            maxFightSpeed = 3;
+            _fightSpeed = 1;
+            _autoPlay = false;
+            _storyDialogSpeed = 1;
+        }
+
         public int GetScore(FightData roleData)
         {
             float score = 0;