Bladeren bron

抽奖活动刷新

zhaoyang 2 jaren geleden
bovenliggende
commit
c6de80199b

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Data/ActivityDataManager.cs

@@ -8,6 +8,7 @@ namespace GFGGame
         {
             luckyBoxActBonusState.Clear();
             allPlayTimes = 0;
+            lastActLuckyBoxId = 0;
         }
 
         /**********************************************************活动*************************************************/
@@ -37,6 +38,7 @@ namespace GFGGame
 
 
         /**********************************************************限时抽奖活动*********************************************/
+        public int lastActLuckyBoxId = 0;
         private int _actLuckyBoxId = 0;
         /// <summary>
         /// 当前抽奖活动id

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -18,7 +18,7 @@ namespace GFGGame
         private SwipeGesture swipeGesture;
         private const int swipeDistance = 100;
         private bool isOpen = false;
-        private int _actLuckyBoxId = 0;
+
         private int _actLimitChargeId = 0;
         private List<AdCfg> _adIds = new List<AdCfg>();
         private Vector2 _startPos;
@@ -805,10 +805,10 @@ namespace GFGGame
             _ui.m_btnActivityLuckyBox.target.visible = actLuckyBoxId > 0;
             if (actLuckyBoxId > 0)
             {
-                if (actLuckyBoxId != _actLuckyBoxId)
+                if (actLuckyBoxId != ActivityDataManager.Instance.lastActLuckyBoxId)
                 {
                     ActivitySProxy.ReqGetTimeLimitLuckyBoxInfo(actLuckyBoxId).Coroutine();
-                    _actLuckyBoxId = actLuckyBoxId;
+                    ActivityDataManager.Instance.lastActLuckyBoxId = actLuckyBoxId;
                 }
                 ActivityOpenCfg activityOpenCfg = ActivityOpenCfgArray.Instance.GetCfg(actLuckyBoxId);
                 _ui.m_btnActivityLuckyBox.target.title = activityOpenCfg.themeName;