Prechádzať zdrojové kódy

新春活动红点提交

zhangyuqian 1 rok pred
rodič
commit
15306feea7

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs

@@ -213,7 +213,7 @@ namespace GFGGame
         //更新查阅建档数据
         public const string STUDIO_FILING_UPDATE = "STUDIO_FILING_UPDATE";
 
-        //更新游戏界面门票数量
+        //更新游戏界面
         public const string MINI_GAME_UPDATE = "MINI_GAME_UPDATE";
 
         // 更新华容道活动界面数据

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

@@ -237,6 +237,8 @@ namespace GFGGame
             MailSProxy.ReqMailCount().Coroutine();
             FriendSProxy.ReqAllFriendInfos().Coroutine();
             ActivityAfuGiftSProxy.GetAfuGiftInfo().Coroutine();
+            ActivityTeaSProxy.ReqGetNPCVisitInfo().Coroutine();
+            MiniGameProxy.ReqGetChallengeReward().Coroutine();
 
             PoemPhotoSProxy.ReqAllPhotoInfos().Coroutine();
             TravelSProxy.ReqTravelInfo().Coroutine();

+ 1 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/CommonSProxy.cs

@@ -63,6 +63,7 @@ namespace GFGGame
                     await ActivityGlobalSProxy.GetActivityInfo();
                     await ActivityAfuGiftSProxy.GetAfuGiftInfo();
                     await ActivityTeaSProxy.ReqGetNPCVisitInfo();
+                    await MiniGameProxy.ReqGetChallengeReward();
                     ActivityDataManager.Instance.todayActivityTips = GameGlobal.myNumericComponent.GetAsInt(NumericType.IsPropYchmActivity);
                     ActivityDataManager.Instance.todayMonthlyCardTips = GameGlobal.myNumericComponent.GetAsInt(NumericType.IsPropCzykActivity);
                     EventAgent.DispatchEvent(ConstMessage.RESET_DAILY_DATA);

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/MiniGameProxy.cs

@@ -26,7 +26,7 @@ namespace GFGGame
             return true;
         }
 
-        public static async ETTask<bool> ReqGetChallengeReward(int activityId)
+        public static async ETTask<bool> ReqGetChallengeReward(int activityId = 1)
         {
             var response = (S2C_GetActivityGameInfos)await MessageHelper.SendToServer(new C2S_GetActivityGameInfos { ActivityId = activityId });
             if (!(response is { Error: ErrorCode.ERR_Success })) return false;

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/MiniGame/ChallengeRewardView.cs

@@ -212,6 +212,7 @@ namespace GFGGame
             }
             _ui.m_reward.m_rewardOneList.numItems = oneNumItems;
             _ui.m_reward.m_rewardTwoList.numItems = twoNumItems;
+            EventAgent.DispatchEvent(ConstMessage.MINI_GAME_UPDATE);
         }
         private void GetGameArray(int i,int j,int index)
         {

+ 7 - 2
GameClient/Assets/Game/HotUpdate/Views/MiniGame/GameStartView.cs

@@ -82,12 +82,12 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             base.AddEventListener();
-            EventAgent.AddEventListener(ConstMessage.MINI_GAME_UPDATE, OnNumericChange);
+            EventAgent.AddEventListener(ConstMessage.MINI_GAME_UPDATE, UpdateRed);
         }
         protected override void RemoveEventListener()
         {
             base.RemoveEventListener();
-            EventAgent.AddEventListener(ConstMessage.MINI_GAME_UPDATE, OnNumericChange);
+            EventAgent.AddEventListener(ConstMessage.MINI_GAME_UPDATE, UpdateRed);
         }
         protected override void OnHide()
         {
@@ -95,6 +95,11 @@ namespace GFGGame
             ChallengeList.Clear();
             base.OnHide();
         }
+
+        private void UpdateRed()
+        {
+            RedDotController.Instance.SetComRedDot(_ui.m_rewardBtn.target, MiniGameDateManager.Instance.GetRewardRot());
+        }
         private void UpdateView()
         {
             if(ChallengeList.Count == 0)

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/OpenServerActivity/OpenServerActivityView.cs

@@ -98,6 +98,7 @@ namespace GFGGame
         private void UpdateRedDot()
         {
             RedDotController.Instance.SetComRedDot(_ui.m_btnTenShu, (RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitStlyc) || RedDotDataManager.Instance.GetGiftBagRewardRed() || RedDotDataManager.Instance.GetMeiRiTeHuiRed()), "", -100, 11);
+            RedDotController.Instance.SetComRedDot(_ui.m_btnHeaven, MiniGameDateManager.Instance.GetRewardRot());
         }
 
         private void UpdateTime(object param)
@@ -126,7 +127,6 @@ namespace GFGGame
         {
             //小游戏入口
             ViewManager.Show<GameStartView>();
-            //ViewManager.Show<ActivityThemeLuckyBoxView>(null, true);
         }
 
         private void OnClickBtnMingTong()