浏览代码

首充红点

guodong 2 年之前
父节点
当前提交
4555081f0c
共有 1 个文件被更改,包括 8 次插入2 次删除
  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)
         private void OnNumericChange(EventContext context)
         {
         {
-            if ((int)context.data == NumericType.Lvl)
+            var numericType = (int)context.data;
+            if (numericType == NumericType.Lvl)
             {
             {
                 UpdateRoleLvl();
                 UpdateRoleLvl();
                 CheckFunOpen();
                 CheckFunOpen();
             }
             }
-            if ((int)context.data == NumericType.FirstRechargeBonusStatus)
+            if (numericType == NumericType.FirstRechargeBonusStatus || numericType == NumericType.RechargeTotal)
             {
             {
                 UpdateBtnFirstRecharge();
                 UpdateBtnFirstRecharge();
             }
             }
@@ -789,6 +790,11 @@ namespace GFGGame
         private void UpdateBtnFirstRecharge()
         private void UpdateBtnFirstRecharge()
         {
         {
             _ui.m_btnFirstRecharge.target.visible = ActivityDataManager.Instance.firstChargeBonusStatus != ConstBonusStatus.GOT;
             _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()
         private void UpdateRoleLvl()