Эх сурвалжийг харах

摘星增加概率提升提示

huangxiaoyue 1 жил өмнө
parent
commit
1bbe810311

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox1.cs

@@ -21,6 +21,8 @@ namespace UI.LuckyBox
         public GTextField m_txtOwned;
         public UI_comLuckBoxBtn m_comLuckBoxBtn;
         public GTextField m_txtCount;
+        public GTextField m_txtHasTime;
+        public GGroup m_grpActivityTips;
         public const string URL = "ui://drx9d1usduuftcr";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "ComBox1";
@@ -82,6 +84,8 @@ namespace UI.LuckyBox
             m_txtOwned = (GTextField)comp.GetChild("txtOwned");
             m_comLuckBoxBtn = (UI_comLuckBoxBtn)UI_comLuckBoxBtn.Create(comp.GetChild("comLuckBoxBtn"));
             m_txtCount = (GTextField)comp.GetChild("txtCount");
+            m_txtHasTime = (GTextField)comp.GetChild("txtHasTime");
+            m_grpActivityTips = (GGroup)comp.GetChild("grpActivityTips");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -102,6 +106,8 @@ namespace UI.LuckyBox
             m_comLuckBoxBtn.Dispose();
             m_comLuckBoxBtn = null;
             m_txtCount = null;
+            m_txtHasTime = null;
+            m_grpActivityTips = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_LuckyBoxActivityUI.cs

@@ -17,6 +17,7 @@ namespace UI.LuckyBox
         public UI_ComBagTime m_comBagTime;
         public GButton m_btnShop;
         public GButton m_btnReward;
+        public Transition m_btnLuckyDiscount_loop;
         public const string URL = "ui://drx9d1usmbf1tad";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "LuckyBoxActivityUI";
@@ -74,6 +75,7 @@ namespace UI.LuckyBox
             m_comBagTime = (UI_ComBagTime)UI_ComBagTime.Create(comp.GetChild("comBagTime"));
             m_btnShop = (GButton)comp.GetChild("btnShop");
             m_btnReward = (GButton)comp.GetChild("btnReward");
+            m_btnLuckyDiscount_loop = comp.GetTransition("btnLuckyDiscount_loop");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -89,6 +91,7 @@ namespace UI.LuckyBox
             m_comBagTime = null;
             m_btnShop = null;
             m_btnReward = null;
+            m_btnLuckyDiscount_loop = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 27 - 0
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -155,6 +155,10 @@ namespace GFGGame
             if (actLimitTsyOpen)// && LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_2
                 Timers.inst.Add(1, 0, UpdateTime);
 
+            //第二个活动的模拟活动倒计时
+            if (!actLimitTsyOpen && boxId == LuckyBoxDataManager.BOX_ID_2)
+                Timers.inst.Add(1, 0, UpdateImitateTime);
+
             Timers.inst.AddUpdate(CheckGuide);
         }
 
@@ -175,6 +179,13 @@ namespace GFGGame
                 comBox.m_showActivityType.selectedIndex = 1;
                 UpGiftBox(comBox);
             }
+            else if (boxId == LuckyBoxDataManager.BOX_ID_2) { 
+                long endTime = TimeUtil.DateTimeToTimestamp("[2024][1][28][05:00]");
+                if (endTime < TimeHelper.ServerNow())
+                    comBox.m_showActivityType.selectedIndex = 0;
+                else
+                    comBox.m_showActivityType.selectedIndex = 2;
+            }
             else
                 comBox.m_showActivityType.selectedIndex = 0;
 
@@ -431,6 +442,21 @@ namespace GFGGame
             textField.asTextField.text = string.Format("轮换倒计时:{0}", strTime);
         }
 
+        private void UpdateImitateTime(object param = null)
+        {
+            GObject item = _ui.m_listBg.GetChildAt(1);
+            GObject textField = item.asCom.GetChild("txtHasTime");
+            if (textField == null) return;
+            long curTime = TimeHelper.ServerNow();
+            long endTime = TimeUtil.DateTimeToTimestamp("[2024][1][28][05:00]");
+            if (endTime < curTime)
+            {
+                Timers.inst.Remove(UpdateImitateTime);
+                endTime = curTime;
+            }
+            textField.asTextField.text = "剩余时间: " + TimeUtil.FormattingTimeTo_DDHHmm(endTime - curTime);
+        }
+
         private void UpdateTime(object param = null)
         {
             GObject item = _ui.m_listBg.GetChildAt(1);
@@ -570,6 +596,7 @@ namespace GFGGame
 
             Timers.inst.Remove(CheckTime);
             Timers.inst.Remove(UpdateTime);
+            Timers.inst.Remove(UpdateImitateTime);
             Timers.inst.Remove(CheckGuide);
             Debug.Log("OnHide:  LuckyBoxView");
         }

BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_3!a.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_3.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_6!a.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_6.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_7!a.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_7.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes