Răsfoiți Sursa

添加活动界面的刷新/清空

leiyasi 1 an în urmă
părinte
comite
b9e9638db1

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

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

+ 5 - 0
GameClient/Assets/Game/HotUpdate/Data/ActivityAfuGiftDataManager.cs

@@ -110,5 +110,10 @@ namespace GFGGame
 
             return false;
         }
+
+        public void Clear()
+        {
+            isOpen = false;
+        }
     }
 }

+ 6 - 1
GameClient/Assets/Game/HotUpdate/Views/ActivityAfuGift/ActivityAfuGiftView.cs

@@ -56,7 +56,7 @@ namespace GFGGame
             ProgressAutoLocate();
             UpdateTime(null);
             Timers.inst.Add(1, 0, UpdateTime);
-            UpdateButtonState();
+            UpdateState();
         }
 
         protected override void OnHide()
@@ -208,11 +208,16 @@ namespace GFGGame
                 switch (getState)
                 {
                     case ConstBonusStatus.CAN_NOT_GET:
+                        comItem.m_grpGot.visible = false;
+                        obj.touchable = true;
+                        // 隐藏红点
+                        RedDotController.Instance.SetComRedDot(obj.asCom, false);
                         break;
 
                     case ConstBonusStatus.CAN_GET:
                         canGet = true;
                         comItem.m_grpGot.visible = false;
+                        obj.touchable = true;
                         // 显示红点
                         RedDotController.Instance.SetComRedDot(obj.asCom, true, "", -33, 27);
                         break;