Browse Source

首充红点

guodong 2 years ago
parent
commit
4555081f0c
1 changed files with 8 additions and 2 deletions
  1. 8 2
      GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

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

@@ -775,12 +775,13 @@ namespace GFGGame
 
         private void OnNumericChange(EventContext context)
         {
-            if ((int)context.data == NumericType.Lvl)
+            var numericType = (int)context.data;
+            if (numericType == NumericType.Lvl)
             {
                 UpdateRoleLvl();
                 CheckFunOpen();
             }
-            if ((int)context.data == NumericType.FirstRechargeBonusStatus)
+            if (numericType == NumericType.FirstRechargeBonusStatus || numericType == NumericType.RechargeTotal)
             {
                 UpdateBtnFirstRecharge();
             }
@@ -789,6 +790,11 @@ namespace GFGGame
         private void UpdateBtnFirstRecharge()
         {
             _ui.m_btnFirstRecharge.target.visible = ActivityDataManager.Instance.firstChargeBonusStatus != ConstBonusStatus.GOT;
+            if(_ui.m_btnFirstRecharge.target.visible)
+            {
+                bool canget = ActivityDataManager.Instance.firstChargeBonusStatus == ConstBonusStatus.CAN_GET;
+                RedDotController.Instance.SetComRedDot(_ui.m_btnFirstRecharge.target, canget);
+            }
         }
 
         private void UpdateRoleLvl()