瀏覽代碼

抽奖卡顿

zhaoyang 2 年之前
父節點
當前提交
a58c15e457

+ 2 - 3
FGUIProject/assets/LuckyBox/combox/ComModel.xml

@@ -4,10 +4,9 @@
     <loader id="n40_mbf1" name="loaBg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" align="center" vAlign="middle" fill="scaleMatchWidth">
     <loader id="n40_mbf1" name="loaBg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" align="center" vAlign="middle" fill="scaleMatchWidth">
       <relation target="" sidePair="center-center,middle-middle"/>
       <relation target="" sidePair="center-center,middle-middle"/>
     </loader>
     </loader>
-    <loader id="n43_duuf" name="loaRes" xy="354,717" pivot="0.5,0.5" anchor="true" size="50,50" align="center" vAlign="middle"/>
-    <graph id="n39_dhoa" name="holder" xy="540,900" pivot="0.5,0.5" anchor="true" size="10,10">
+    <component id="n45_o4m7" name="comModelRes" src="o4m7tf6" fileName="combox/ComModelRes.xml" xy="0,0">
       <relation target="" sidePair="center-center,middle-middle"/>
       <relation target="" sidePair="center-center,middle-middle"/>
-    </graph>
+    </component>
     <loader id="n44_ofwu" name="loaMask" xy="0,-240" size="1080,2400" alpha="0" url="ui://drx9d1usduuftf2" align="center" vAlign="middle" fill="scaleMatchWidth">
     <loader id="n44_ofwu" name="loaMask" xy="0,-240" size="1080,2400" alpha="0" url="ui://drx9d1usduuftf2" align="center" vAlign="middle" fill="scaleMatchWidth">
       <relation target="" sidePair="width-width,height-height"/>
       <relation target="" sidePair="width-width,height-height"/>
     </loader>
     </loader>

+ 9 - 0
FGUIProject/assets/LuckyBox/combox/ComModelRes.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="1080,1920">
+  <displayList>
+    <loader id="n46_o4m7" name="loaRes" xy="455,460" pivot="0.5,0.5" anchor="true" size="50,50" align="center" vAlign="middle"/>
+    <graph id="n47_o4m7" name="holder" xy="641,643" pivot="0.5,0.5" anchor="true" size="10,10">
+      <relation target="" sidePair="center-center,middle-middle"/>
+    </graph>
+  </displayList>
+</component>

+ 1 - 0
FGUIProject/assets/LuckyBox/package.xml

@@ -158,6 +158,7 @@
     <component id="e050tf3" name="LuckBoxBonusShowUI.xml" path="/" exported="true"/>
     <component id="e050tf3" name="LuckBoxBonusShowUI.xml" path="/" exported="true"/>
     <component id="e050tf4" name="LuckyBoxBonusShowItem.xml" path="/components/"/>
     <component id="e050tf4" name="LuckyBoxBonusShowItem.xml" path="/components/"/>
     <image id="e050tf5" name="zx_wp_lan_grey.png" path="/imageNews/"/>
     <image id="e050tf5" name="zx_wp_lan_grey.png" path="/imageNews/"/>
+    <component id="o4m7tf6" name="ComModelRes.xml" path="/combox/"/>
   </resources>
   </resources>
   <publish name="" path="../GameClient/Assets/ResIn/UI/LuckyBox" packageCount="2" genCode="true" extractAlpha="true"/>
   <publish name="" path="../GameClient/Assets/ResIn/UI/LuckyBox" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>
 </packageDescription>

+ 4 - 6
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComModel.cs

@@ -8,8 +8,7 @@ namespace UI.LuckyBox
     {
     {
         public GComponent target;
         public GComponent target;
         public GLoader m_loaBg;
         public GLoader m_loaBg;
-        public GLoader m_loaRes;
-        public GGraph m_holder;
+        public UI_ComModelRes m_comModelRes;
         public GLoader m_loaMask;
         public GLoader m_loaMask;
         public Transition m_t0;
         public Transition m_t0;
         public Transition m_t1;
         public Transition m_t1;
@@ -61,8 +60,7 @@ namespace UI.LuckyBox
         private void Init(GComponent comp)
         private void Init(GComponent comp)
         {
         {
             m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_loaBg = (GLoader)comp.GetChild("loaBg");
-            m_loaRes = (GLoader)comp.GetChild("loaRes");
-            m_holder = (GGraph)comp.GetChild("holder");
+            m_comModelRes = (UI_ComModelRes)UI_ComModelRes.Create(comp.GetChild("comModelRes"));
             m_loaMask = (GLoader)comp.GetChild("loaMask");
             m_loaMask = (GLoader)comp.GetChild("loaMask");
             m_t0 = comp.GetTransition("t0");
             m_t0 = comp.GetTransition("t0");
             m_t1 = comp.GetTransition("t1");
             m_t1 = comp.GetTransition("t1");
@@ -70,8 +68,8 @@ namespace UI.LuckyBox
         public void Dispose(bool disposeTarget = false)
         public void Dispose(bool disposeTarget = false)
         {
         {
             m_loaBg = null;
             m_loaBg = null;
-            m_loaRes = null;
-            m_holder = null;
+            m_comModelRes.Dispose();
+            m_comModelRes = null;
             m_loaMask = null;
             m_loaMask = null;
             m_t0 = null;
             m_t0 = null;
             m_t1 = null;
             m_t1 = null;

+ 74 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComModelRes.cs

@@ -0,0 +1,74 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.LuckyBox
+{
+    public partial class UI_ComModelRes
+    {
+        public GComponent target;
+        public GLoader m_loaRes;
+        public GGraph m_holder;
+        public const string URL = "ui://drx9d1uso4m7tf6";
+        public const string PACKAGE_NAME = "LuckyBox";
+        public const string RES_NAME = "ComModelRes";
+        private static UI_ComModelRes _proxy;
+
+        public static UI_ComModelRes Create(GObject gObject = null)
+        {
+            var ui = new UI_ComModelRes();
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_ComModelRes Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ComModelRes();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_loaRes = (GLoader)comp.GetChild("loaRes");
+            m_holder = (GGraph)comp.GetChild("holder");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_loaRes = null;
+            m_holder = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComModelRes.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 45d627b6486db9d498cdc2fbeea8aca4
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 10 - 10
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/LuckyBoxController.cs

@@ -67,9 +67,9 @@ namespace GFGGame
             {
             {
                 int direction = _luckyBoxCfg.scaleArr[_modelIndex] >= 0 ? 1 : -1;
                 int direction = _luckyBoxCfg.scaleArr[_modelIndex] >= 0 ? 1 : -1;
                 float scale = _luckyBoxCfg.scaleArr.Length > 0 ? Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]) / 10000f : 1;
                 float scale = _luckyBoxCfg.scaleArr.Length > 0 ? Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]) / 10000f : 1;
-                _comModel.m_loaRes.url = string.Format("ui://LuckyBox/{0}", _luckyBoxCfg.resArr[_modelIndex]);
-                _comModel.m_loaRes.SetPosition(_luckyBoxCfg.posArr[_modelIndex][0], _luckyBoxCfg.posArr[_modelIndex][1], 1);
-                _comModel.m_loaRes.SetScale(direction * scale, scale);
+                _comModel.m_comModelRes.m_loaRes.url = string.Format("ui://LuckyBox/{0}", _luckyBoxCfg.resArr[_modelIndex]);
+                _comModel.m_comModelRes.m_loaRes.SetPosition(_luckyBoxCfg.posArr[_modelIndex][0], _luckyBoxCfg.posArr[_modelIndex][1], 1);
+                _comModel.m_comModelRes.m_loaRes.SetScale(direction * scale, scale);
             }
             }
             else if (_luckyBoxCfg.suitIdArr.Length > 0)
             else if (_luckyBoxCfg.suitIdArr.Length > 0)
             {
             {
@@ -81,23 +81,23 @@ namespace GFGGame
                 if (_luckyBoxCfg.isAni == 0)
                 if (_luckyBoxCfg.isAni == 0)
                 {
                 {
                     SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(_luckyBoxCfg.suitIdArr[_modelIndex]);
                     SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(_luckyBoxCfg.suitIdArr[_modelIndex]);
-                    _comModel.m_loaRes.url = ResPathUtil.GetDressUpPath(suitCfg.aniRes);
+                    _comModel.m_comModelRes.m_loaRes.url = ResPathUtil.GetDressUpPath(suitCfg.aniRes);
 
 
                     float scale = _luckyBoxCfg.scaleArr.Length > 0 ? Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]) / 10000f : 1;
                     float scale = _luckyBoxCfg.scaleArr.Length > 0 ? Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]) / 10000f : 1;
-                    _comModel.m_loaRes.SetScale(direction * scale, scale);
-                    _comModel.m_loaRes.SetPosition(_luckyBoxCfg.posArr[_modelIndex][0], _luckyBoxCfg.posArr[_modelIndex][1], 1);
+                    _comModel.m_comModelRes.m_loaRes.SetScale(direction * scale, scale);
+                    _comModel.m_comModelRes.m_loaRes.SetPosition(_luckyBoxCfg.posArr[_modelIndex][0], _luckyBoxCfg.posArr[_modelIndex][1], 1);
                 }
                 }
                 else
                 else
                 {
                 {
-                    _comModel.m_loaRes.url = "";
+                    _comModel.m_comModelRes.m_loaRes.url = "";
                     _comModel.m_loaMask.alpha = 1;
                     _comModel.m_loaMask.alpha = 1;
                     // yield return null;
                     // yield return null;
                     int scale = _luckyBoxCfg.scaleArr.Length > 0 ? Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]) / 10000 : 100;
                     int scale = _luckyBoxCfg.scaleArr.Length > 0 ? Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]) / 10000 : 100;
                     _dressUpObjUI.ResetSceneObj(scale, false, false, null, false);
                     _dressUpObjUI.ResetSceneObj(scale, false, false, null, false);
                     _dressUpObjUI.dressUpObj.PutOnSuitCfg(_luckyBoxCfg.suitIdArr[_modelIndex], true, new int[] { ConstDressUpItemType.BEI_JING }, false, false);
                     _dressUpObjUI.dressUpObj.PutOnSuitCfg(_luckyBoxCfg.suitIdArr[_modelIndex], true, new int[] { ConstDressUpItemType.BEI_JING }, false, false);
-                    _dressUpObjUI.UpdateWrapper(_comModel.m_holder);
+                    _dressUpObjUI.UpdateWrapper(_comModel.m_comModelRes.m_holder);
                     _dressUpObjUI.sceneObject.transform.localScale = new Vector3(direction * scale, scale, scale);
                     _dressUpObjUI.sceneObject.transform.localScale = new Vector3(direction * scale, scale, scale);
-                    _comModel.m_holder.SetPosition(_luckyBoxCfg.posArr[_modelIndex][0], _luckyBoxCfg.posArr[_modelIndex][1], 1);
+                    _comModel.m_comModelRes.m_holder.SetPosition(_luckyBoxCfg.posArr[_modelIndex][0], _luckyBoxCfg.posArr[_modelIndex][1], 1);
                     // yield return null;
                     // yield return null;
                 }
                 }
             }
             }
@@ -111,7 +111,7 @@ namespace GFGGame
             _modelIndex = 0;
             _modelIndex = 0;
             _dressUpObjUI.ResetSceneObj(0, false, false, null, false);
             _dressUpObjUI.ResetSceneObj(0, false, false, null, false);
             UI_ComModel _comModel = UI_ComModel.Proxy(_com);
             UI_ComModel _comModel = UI_ComModel.Proxy(_com);
-            _comModel.m_loaRes.url = "";
+            _comModel.m_comModelRes.m_loaRes.url = "";
             UI_ComModel.ProxyEnd();
             UI_ComModel.ProxyEnd();
             Timers.inst.Remove(UpdateTime);
             Timers.inst.Remove(UpdateTime);
         }
         }

+ 13 - 8
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxActivityView.cs

@@ -59,7 +59,7 @@ namespace GFGGame
         protected override void AddEventListener()
         protected override void AddEventListener()
         {
         {
             base.AddEventListener();
             base.AddEventListener();
-            EventAgent.AddEventListener(ConstMessage.ACTIVITY_LUCKY_BOX, UpdateView);
+            EventAgent.AddEventListener(ConstMessage.ACTIVITY_LUCKY_BOX, UpdateListItemData);
             EventAgent.AddEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
             EventAgent.AddEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
 
 
         }
         }
@@ -113,11 +113,7 @@ namespace GFGGame
             LuckyBoxDataManager.Instance.InitData(_luckyBoxCfg.id);
             LuckyBoxDataManager.Instance.InitData(_luckyBoxCfg.id);
             // comBox.m_comModel.m_loaBg.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.resArr[0]);
             // comBox.m_comModel.m_loaBg.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.resArr[0]);
             comBox.m_btnPreview.m_c1.selectedIndex = 1;
             comBox.m_btnPreview.m_c1.selectedIndex = 1;
-            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();
-            int boughtCount = GameGlobal.myNumericComponent.GetAsInt(_luckyBoxCfg.numericType);
-            comBox.m_txtRemainTimes.text = string.Format("今日剩余次数:{0}", _luckyBoxCfg.maxCount - boughtCount);
+
 
 
             comBox.m_comCostOne.m_txtCost.text = _luckyBoxCfg.costNum.ToString();
             comBox.m_comCostOne.m_txtCost.text = _luckyBoxCfg.costNum.ToString();
             comBox.m_comCostOne.m_loaCost.url = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(_luckyBoxCfg.costID).res);
             comBox.m_comCostOne.m_loaCost.url = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(_luckyBoxCfg.costID).res);
@@ -145,7 +141,16 @@ namespace GFGGame
 
 
             UI_ComBox.ProxyEnd();
             UI_ComBox.ProxyEnd();
         }
         }
-
+        private void UpdateListItemData()
+        {
+            UI_ComBox comBox = UI_ComBox.Proxy(_ui.m_comBox.target);
+            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();
+            int boughtCount = GameGlobal.myNumericComponent.GetAsInt(_luckyBoxCfg.numericType);
+            comBox.m_txtRemainTimes.text = string.Format("今日剩余次数:{0}", _luckyBoxCfg.maxCount - boughtCount);
+            UI_ComBox.ProxyEnd();
+        }
         private void UpGiftBox()
         private void UpGiftBox()
         {
         {
             var activityInfoByTypeList =
             var activityInfoByTypeList =
@@ -277,7 +282,7 @@ namespace GFGGame
         protected override void RemoveEventListener()
         protected override void RemoveEventListener()
         {
         {
             base.RemoveEventListener();
             base.RemoveEventListener();
-            EventAgent.RemoveEventListener(ConstMessage.ACTIVITY_LUCKY_BOX, UpdateView);
+            EventAgent.RemoveEventListener(ConstMessage.ACTIVITY_LUCKY_BOX, UpdateListItemData);
             EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
             EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
 
 
         }
         }

+ 21 - 10
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -88,8 +88,8 @@ namespace GFGGame
         {
         {
             base.AddEventListener();
             base.AddEventListener();
 
 
-            EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, OnListBgScroll);
-            EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, OnListBgScroll);
+            EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, UpdateListItemData);
+            EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateListItemData);
         }
         }
         protected override void OnShown()
         protected override void OnShown()
         {
         {
@@ -143,13 +143,14 @@ namespace GFGGame
         private void OnBtnLeftClick()
         private void OnBtnLeftClick()
         {
         {
             int index = _curIndex - 1;
             int index = _curIndex - 1;
-            index = Mathf.Max(0, index);
+            if (index < 0) return;
             _ui.m_listBg.ScrollToView(index, true);
             _ui.m_listBg.ScrollToView(index, true);
         }
         }
 
 
         private void OnBtnRightClick()
         private void OnBtnRightClick()
         {
         {
             int index = _curIndex + 1;
             int index = _curIndex + 1;
+            // if (index >= LuckyBoxDataManager.Instance.luckyBoxIds.Count) return;
             index = Mathf.Min(_ui.m_listBg.numItems - 1, index);
             index = Mathf.Min(_ui.m_listBg.numItems - 1, index);
             _ui.m_listBg.ScrollToView(index, true);
             _ui.m_listBg.ScrollToView(index, true);
         }
         }
@@ -187,9 +188,9 @@ namespace GFGGame
             {
             {
                 _lcukyBoxCtrl.Add(boxId, new LuckyBoxController(comBox.m_comModel.target));
                 _lcukyBoxCtrl.Add(boxId, new LuckyBoxController(comBox.m_comModel.target));
             }
             }
+
             _lcukyBoxCtrl[LuckyBoxDataManager.Instance.currentBoxId].OnShown(LuckyBoxDataManager.Instance.currentBoxId);
             _lcukyBoxCtrl[LuckyBoxDataManager.Instance.currentBoxId].OnShown(LuckyBoxDataManager.Instance.currentBoxId);
 
 
-            LuckyBoxDataManager.Instance.GetOwnedCount(boxId, out int count, out int totalCount);
             comBox.m_imgSpecial.visible = boxId != LuckyBoxDataManager.BOX_ID_3;
             comBox.m_imgSpecial.visible = boxId != LuckyBoxDataManager.BOX_ID_3;
             GGraph holder = comBox.m_btnBuyTen.GetChild("holder").asGraph;
             GGraph holder = comBox.m_btnBuyTen.GetChild("holder").asGraph;
             holder.visible = boxId != LuckyBoxDataManager.BOX_ID_3;
             holder.visible = boxId != LuckyBoxDataManager.BOX_ID_3;
@@ -200,10 +201,6 @@ namespace GFGGame
             string resPath1 = ResPathUtil.GetViewEffectPath("ui_LuckyBox", "but_text_dc");
             string resPath1 = ResPathUtil.GetViewEffectPath("ui_LuckyBox", "but_text_dc");
             SceneController.AddObjectToView(_gameObject1, _wrapper1, comBox.m_holder, resPath1, out _gameObject1, out _wrapper1);
             SceneController.AddObjectToView(_gameObject1, _wrapper1, comBox.m_holder, resPath1, out _gameObject1, out _wrapper1);
 
 
-            comBox.m_txtOwned.SetVar("v1", "" + count).FlushVars();
-            comBox.m_txtOwned.SetVar("v2", "" + totalCount).FlushVars();
-            int boughtCount = GameGlobal.myNumericComponent.GetAsInt(cfg.numericType);
-            comBox.m_txtRemainTimes.text = string.Format("今日剩余次数:{0}", cfg.maxCount - boughtCount);
             comBox.m_comCostOne.m_txtCost.text = cfg.costNum.ToString();
             comBox.m_comCostOne.m_txtCost.text = cfg.costNum.ToString();
             comBox.m_comCostOne.m_loaCost.url = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(cfg.costID).res);
             comBox.m_comCostOne.m_loaCost.url = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(cfg.costID).res);
             comBox.m_comCostTen.m_txtCost.text = cfg.costNumTen.ToString();
             comBox.m_comCostTen.m_txtCost.text = cfg.costNumTen.ToString();
@@ -244,6 +241,20 @@ namespace GFGGame
                 comBox.m_loaTitle.url = string.Format("ui://LuckyBox/zx_title_{0}", boxId);
                 comBox.m_loaTitle.url = string.Format("ui://LuckyBox/zx_title_{0}", boxId);
             }
             }
             UI_ComBox1.ProxyEnd();
             UI_ComBox1.ProxyEnd();
+            UpdateListItemData();
+        }
+        private void UpdateListItemData()
+        {
+            int boxId = LuckyBoxDataManager.Instance.luckyBoxIds[_curIndex];
+            LuckyBoxCfg cfg = LuckyBoxCfgArray.Instance.GetCfg(boxId);
+            GObject obj = _ui.m_listBg.GetChildAt(_curIndex);
+            UI_ComBox1 comBox = UI_ComBox1.Proxy(obj);
+            LuckyBoxDataManager.Instance.GetOwnedCount(boxId, out int count, out int totalCount);
+            comBox.m_txtOwned.SetVar("v1", "" + count).FlushVars();
+            comBox.m_txtOwned.SetVar("v2", "" + totalCount).FlushVars();
+            int boughtCount = GameGlobal.myNumericComponent.GetAsInt(cfg.numericType);
+            comBox.m_txtRemainTimes.text = string.Format("今日剩余次数:{0}", cfg.maxCount - boughtCount);
+            UI_ComBox1.ProxyEnd();
         }
         }
 
 
         private void UpdateEffect()
         private void UpdateEffect()
@@ -354,8 +365,8 @@ namespace GFGGame
         protected override void RemoveEventListener()
         protected override void RemoveEventListener()
         {
         {
             base.RemoveEventListener();
             base.RemoveEventListener();
-            EventAgent.RemoveEventListener(ConstMessage.ITEM_CHANGED, OnListBgScroll);
-            EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, OnListBgScroll);
+            EventAgent.RemoveEventListener(ConstMessage.ITEM_CHANGED, UpdateListItemData);
+            EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateListItemData);
         }
         }
 
 
         private void OnClickBtnBack()
         private void OnClickBtnBack()

二進制
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes