Przeglądaj źródła

开服抽奖ui细节

huangxiaoyue 1 rok temu
rodzic
commit
334f0bbd4b

+ 12 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox.cs

@@ -9,8 +9,10 @@ namespace UI.LuckyBox
         public GComponent target;
         public Controller m_c1;
         public UI_ComModel m_comModel;
+        public GLoader m_btnOpenServer;
         public UI_Button3 m_btnPreview;
         public GTextField m_txtOwned;
+        public GTextField m_txtOpenServerOwned;
         public GLoader m_imgActLuckyBox;
         public UI_ComCost2 m_comCostOne;
         public UI_ComCost2 m_comCostTen;
@@ -21,6 +23,8 @@ namespace UI.LuckyBox
         public GGraph m_Special_eff;
         public GImage m_imgSpecial;
         public GGroup m_grpSpecial;
+        public GTextField m_txtCount;
+        public GTextField m_txtOpenServerCount;
         public const string URL = "ui://drx9d1usnjmn2p";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "ComBox";
@@ -70,8 +74,10 @@ namespace UI.LuckyBox
         {
             m_c1 = comp.GetController("c1");
             m_comModel = (UI_ComModel)UI_ComModel.Create(comp.GetChild("comModel"));
+            m_btnOpenServer = (GLoader)comp.GetChild("btnOpenServer");
             m_btnPreview = (UI_Button3)UI_Button3.Create(comp.GetChild("btnPreview"));
             m_txtOwned = (GTextField)comp.GetChild("txtOwned");
+            m_txtOpenServerOwned = (GTextField)comp.GetChild("txtOpenServerOwned");
             m_imgActLuckyBox = (GLoader)comp.GetChild("imgActLuckyBox");
             m_comCostOne = (UI_ComCost2)UI_ComCost2.Create(comp.GetChild("comCostOne"));
             m_comCostTen = (UI_ComCost2)UI_ComCost2.Create(comp.GetChild("comCostTen"));
@@ -82,15 +88,19 @@ namespace UI.LuckyBox
             m_Special_eff = (GGraph)comp.GetChild("Special_eff");
             m_imgSpecial = (GImage)comp.GetChild("imgSpecial");
             m_grpSpecial = (GGroup)comp.GetChild("grpSpecial");
+            m_txtCount = (GTextField)comp.GetChild("txtCount");
+            m_txtOpenServerCount = (GTextField)comp.GetChild("txtOpenServerCount");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_c1 = null;
             m_comModel.Dispose();
             m_comModel = null;
+            m_btnOpenServer = null;
             m_btnPreview.Dispose();
             m_btnPreview = null;
             m_txtOwned = null;
+            m_txtOpenServerOwned = null;
             m_imgActLuckyBox = null;
             m_comCostOne.Dispose();
             m_comCostOne = null;
@@ -103,6 +113,8 @@ namespace UI.LuckyBox
             m_Special_eff = null;
             m_imgSpecial = null;
             m_grpSpecial = null;
+            m_txtCount = null;
+            m_txtOpenServerCount = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

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

@@ -15,7 +15,6 @@ namespace UI.LuckyBox
         public UI_ComBagTime m_comBagTime;
         public GButton m_btnShop;
         public GButton m_btnReward;
-        public GTextField m_txtCount;
         public const string URL = "ui://drx9d1usmbf1tad";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "LuckyBoxActivityUI";
@@ -71,7 +70,6 @@ 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_txtCount = (GTextField)comp.GetChild("txtCount");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -85,7 +83,6 @@ namespace UI.LuckyBox
             m_comBagTime = null;
             m_btnShop = null;
             m_btnReward = null;
-            m_txtCount = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 1 - 5
GameClient/Assets/Game/HotUpdate/Views/Card/CardFosterView.cs

@@ -1200,17 +1200,13 @@ namespace GFGGame
                 _ui.m_loaListener.visible = false;
 
                 float scale = _ui.target.height / CardDataManager.CardResInitHight;
-                _ui.m_comCard.target.scrollPane.viewWidth = _ui.target.width / scale;// (_ui.target.width / (scale*100))/100;
+                _ui.m_comCard.target.scrollPane.viewWidth = _ui.target.width / scale;
                 _ui.m_comCard.target.scrollPane.SetPercX(0.5f, true);
-
                 _ui.m_t0.SetValue("scale", scale, scale);
-
                 _ui.m_t0.SetValue("normal", _cardScale, _cardScale);
-
                 _ui.m_t0.Play(() =>
                 {
                     playAni = false;
-
                 });
                 showCard = true;
             }

+ 15 - 14
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxActivityView.cs

@@ -150,8 +150,10 @@ namespace GFGGame
             if (comBox.m_btnPreview.target.data == null)
             {
                 comBox.m_btnPreview.target.onClick.Add(OnClickBtnPreview);
+                comBox.m_btnOpenServer.onClick.Add(OnClickBtnPreview);
             }
             comBox.m_btnPreview.target.data = _luckyBoxCfg.id;
+            comBox.m_btnOpenServer.data = _luckyBoxCfg.id;
 
             comBox.target.data = _luckyBoxCfg.id;
 
@@ -165,18 +167,22 @@ namespace GFGGame
             LuckyBoxDataManager.Instance.GetOwnedCount(_luckyBoxCfg.id, out int count, out int totalCount);
             comBox.m_txtOwned.SetVar("v1", "" + count).FlushVars();
             comBox.m_txtOwned.SetVar("v2", "" + totalCount).FlushVars();
+            comBox.m_txtOpenServerOwned.SetVar("v1", "" + count).FlushVars();
+            comBox.m_txtOpenServerOwned.SetVar("v2", "" + totalCount).FlushVars();
             int boughtCount = GameGlobal.myNumericComponent.GetAsInt(_luckyBoxCfg.numericType);
             comBox.m_txtRemainTimes.text = string.Format("今日剩余次数:{0}", _luckyBoxCfg.maxCount - boughtCount);
-            UI_ComBox.ProxyEnd();
-
-            string strDrawCount = "";
-            if (_activityType == ConstLimitTimeActivityType.ActLimitLuckyBox)
-                strDrawCount = ActivityDataManager.Instance.lastDrawCount.ToString();
-            else if (_activityType == ConstLimitTimeActivityType.ActLimitStlyc)
-                strDrawCount = ActivityDataManager.Instance.lastStlycDrawCount.ToString();
 
-            _ui.m_txtCount.SetVar("value", strDrawCount).FlushVars();
-            _ui.m_txtCount.SetVar("name", _luckyBoxCfg.name).FlushVars();
+            if (_activityType == ConstLimitTimeActivityType.ActLimitLuckyBox) {
+                string strDrawCount = ActivityDataManager.Instance.lastDrawCount.ToString();
+                comBox.m_txtCount.SetVar("value", strDrawCount).FlushVars();
+                comBox.m_txtCount.SetVar("name", _luckyBoxCfg.name).FlushVars();
+            }
+            else if (_activityType == ConstLimitTimeActivityType.ActLimitStlyc){
+                string strLimitStlycDrawCount = ActivityDataManager.Instance.lastStlycDrawCount.ToString();
+                comBox.m_txtOpenServerCount.SetVar("value", strLimitStlycDrawCount).FlushVars();
+                comBox.m_txtOpenServerCount.SetVar("name", _luckyBoxCfg.name).FlushVars();
+            }
+            UI_ComBox.ProxyEnd();
         }
         private void UpGiftBox()
         {
@@ -290,13 +296,9 @@ namespace GFGGame
             var list = activityInfoByTypeList
                 .Where(a => a.EndTime > TimeInfo.Instance.ServerNow()).ToList();
             if (list.Count == 0)
-            {
                 PromptController.Instance.ShowFloatTextPrompt("活动已结束");
-            }
             else
-            {
                 ViewManager.Show<RushSaleGiftBoxView>(new object[] { ActivityType.XSLB3, this.viewData });
-            }
         }
 
         protected override void OnHide()
@@ -312,7 +314,6 @@ namespace GFGGame
             base.RemoveEventListener();
             EventAgent.RemoveEventListener(ConstMessage.ACTIVITY_LUCKY_BOX, UpdateView);
             EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
-
         }
 
         private void OnClickBtnBack()

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_fui.bytes