huangxiaoyue 1 рік тому
батько
коміт
f567545cf7

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/LuckyBoxDataManager.cs

@@ -7,7 +7,7 @@ namespace GFGGame
     public class LuckyBoxDataManager : SingletonBase<LuckyBoxDataManager>
     {
 
-        public const int BOX_ID_1 = 1;
+        public const int BOX_ID_1 = 1;//轮换活动不固定
         public const int BOX_ID_2 = 2;//常驻奖池2
         public const int BOX_ID_3 = 3;//常驻奖池2
 

+ 1 - 2
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs

@@ -20,7 +20,6 @@ namespace GFGGame
         private List<int> _recordTurnIndex = new List<int>();  //记录播放过item位置
         private int _chooseIndex = -1;  //当前选中的index
         private int _countShow = 0;   //第几次展示
-        private int _countNewRecord = 0;  //展示步骤
         private bool _handClick = false;   //手动点击开启
         private bool _AnimationWait = true;   //抽卡动画等待加载完毕
 
@@ -434,7 +433,7 @@ namespace GFGGame
                             _AnimationWait = false;
                         }
 
-                        //判断是否需要显示集齐套装界面
+                        //判断是否需要显示集齐套装界面(需要的时候晚一个定时器时间)
                         if (count < totalCount || (count >= totalCount && _countShow > 3))
                         {
                             _recordTurnIndex.Add(index);

+ 10 - 5
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -105,12 +105,17 @@ namespace GFGGame
         {
             base.OnShown();
             Debug.Log("OnShown:LuckyBoxView");
+
+            _valueBarController.OnShown();
+            _valueBarController.Controller(4);
+
             LuckyBoxDataManager.Instance.luckyBoxIds.Clear();
             LuckyBoxDataManager.Instance.luckyBoxIds.Add(LuckyBoxDataManager.BOX_ID_2);
             LuckyBoxDataManager.Instance.luckyBoxIds.Add(LuckyBoxDataManager.BOX_ID_3);
             _activeBoxId = 0;
             _activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(ConstLimitTimeActivityType.ActLimitTsy);
 
+            //第一个活动可能为轮换活动
             if (LuckyBoxDataManager.Instance.RotatingId > 0)
             {
                 RotatingLuckyBoxCfg rotatingLuckyBox = RotatingLuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.RotatingId);
@@ -122,12 +127,15 @@ namespace GFGGame
             int boxId = LuckyBoxDataManager.Instance.luckyBoxIds[1];
             if (this.viewData != null)
             {
-                boxId = (int)this.viewData;
+                if(boxId != LuckyBoxDataManager.BOX_ID_1)   //是1的时候,就使用轮换活动,不是1就是传入的固定活动
+                    boxId = (int)this.viewData;
             }
 
+            //新手引导选中第一个活动
             if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0) 
-                boxId = LuckyBoxDataManager.BOX_ID_1;
+                boxId = LuckyBoxDataManager.Instance.luckyBoxIds[1];
 
+            //第二个活动会有许愿活动出现
             if (_activityId > 0 && boxId == LuckyBoxDataManager.BOX_ID_2)
                 GetWishingPoolInfo(_activityId);
 
@@ -139,9 +147,6 @@ namespace GFGGame
             else if (actLimitTsyOpen && LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_2)
                 Timers.inst.Add(1, 0, UpdateTime);
 
-            _valueBarController.OnShown();
-            _valueBarController.Controller(4);
-
             _curIndex = LuckyBoxDataManager.Instance.luckyBoxIds.IndexOf(boxId);
             _ui.m_listBg.numItems = LuckyBoxDataManager.Instance.luckyBoxIds.Count;
             _ui.m_listBg.ScrollToView(_curIndex);