huangxiaoyue 1 жил өмнө
parent
commit
7c0767ddc5

+ 8 - 2
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -29,8 +29,6 @@ namespace GFGGame
         {
         {
             EffectUIPool.Recycle(_effectUI1);
             EffectUIPool.Recycle(_effectUI1);
             _effectUI1 = null;
             _effectUI1 = null;
-            EffectUIPool.Recycle(_effectUI2);
-            _effectUI2 = null;
 
 
             if (_valueBarController != null)
             if (_valueBarController != null)
             {
             {
@@ -255,6 +253,10 @@ namespace GFGGame
             //holder.visible = boxId != LuckyBoxDataManager.BOX_ID_3;
             //holder.visible = boxId != LuckyBoxDataManager.BOX_ID_3;
             comBox.m_comLuckBoxBtn.m_holder.visible = boxId != LuckyBoxDataManager.BOX_ID_3;
             comBox.m_comLuckBoxBtn.m_holder.visible = boxId != LuckyBoxDataManager.BOX_ID_3;
 
 
+            if (_effectUI2 != null) {
+                EffectUIPool.Recycle(_effectUI2);
+                _effectUI2 = null;
+            }
             //_effectUI1 = EffectUIPool.CreateEffectUI(holder, "ui_LuckyBox", "Button_Glow");
             //_effectUI1 = EffectUIPool.CreateEffectUI(holder, "ui_LuckyBox", "Button_Glow");
             _effectUI2 = EffectUIPool.CreateEffectUI(comBox.m_comLuckBoxBtn.m_holder, "ui_LuckyBox", "but_text_dc");
             _effectUI2 = EffectUIPool.CreateEffectUI(comBox.m_comLuckBoxBtn.m_holder, "ui_LuckyBox", "but_text_dc");
 
 
@@ -546,6 +548,10 @@ namespace GFGGame
         protected override void OnHide()
         protected override void OnHide()
         {
         {
             base.OnHide();
             base.OnHide();
+
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+
             _valueBarController.OnHide();
             _valueBarController.OnHide();
             foreach (int key in _lcukyBoxCtrl.Keys)
             foreach (int key in _lcukyBoxCtrl.Keys)
             {
             {