Bladeren bron

商城充值加特效

huangxiaoyue 1 jaar geleden
bovenliggende
commit
c314d6d960

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_ListChargeItem.cs

@@ -11,6 +11,7 @@ namespace UI.Store
         public GTextField m_txtName;
         public UI_Component2 m_btnBuy;
         public GTextField m_txtDesc;
+        public GGraph m_holderfEff;
         public GGroup m_grpDouble;
         public const string URL = "ui://p9mtgheohhx91i";
         public const string PACKAGE_NAME = "Store";
@@ -63,6 +64,7 @@ namespace UI.Store
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_btnBuy = (UI_Component2)UI_Component2.Create(comp.GetChild("btnBuy"));
             m_txtDesc = (GTextField)comp.GetChild("txtDesc");
+            m_holderfEff = (GGraph)comp.GetChild("holderfEff");
             m_grpDouble = (GGroup)comp.GetChild("grpDouble");
         }
         public void Dispose(bool disposeTarget = false)
@@ -72,6 +74,7 @@ namespace UI.Store
             m_btnBuy.Dispose();
             m_btnBuy = null;
             m_txtDesc = null;
+            m_holderfEff = null;
             m_grpDouble = null;
             if(disposeTarget && target != null)
             {

+ 17 - 1
GameClient/Assets/Game/HotUpdate/Views/Store/StoreChargeView.cs

@@ -11,6 +11,7 @@ namespace GFGGame
         private UI_StoreChargeUI _ui;
         private ValueBarController _valueBarController;
         private List<ShopCfg> _shopCfgs;
+        private List<EffectUI> _effectUIs = new List<EffectUI>();
 
         public override void Dispose()
         {
@@ -55,14 +56,26 @@ namespace GFGGame
             UpdateView();
         }
 
+        private void DestroyEffect()
+        {
+            for (int i = 0; i < _effectUIs.Count; i++)
+            {
+                EffectUIPool.Recycle(_effectUIs[i]);
+                _effectUIs[i] = null;
+            }
+            _effectUIs.Clear();
+        }
+
         private void UpdateView()
         {
+            DestroyEffect();
             _ui.m_list.numItems = _shopCfgs.Count;
             ShopViewManager.Instance.UpdateVipProgressCom(_ui.m_comVipLv.target);
         }
         protected override void OnHide()
         {
             base.OnHide();
+            DestroyEffect();
             _valueBarController.OnHide();
         }
         protected override void RemoveEventListener()
@@ -90,7 +103,10 @@ namespace GFGGame
             item.m_grpDouble.visible = isDouble;
             item.m_txtDesc.visible = isDouble;
             item.m_icon.url = "ui://Store/sc_zizhuan_" + (index + 1);
-
+            if (isDouble) {
+                EffectUI _effectUI = EffectUIPool.CreateEffectUI(item.m_holderfEff, "ui_Small_parts", "store_FirstCharge_Double");
+                _effectUIs.Add(_effectUI);
+            }
             UI_ListChargeItem.ProxyEnd();
         }
 

BIN
GameClient/Assets/ResIn/UI/Store/Store_fui.bytes