Bladeren bron

添加特效

leiyasi 1 jaar geleden
bovenliggende
commit
eaec4b89cf

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

@@ -15,9 +15,9 @@ namespace UI.LuckyBox
         public UI_ComCost2 m_comCostOne;
         public UI_ComCost2 m_comCostTen;
         public GButton m_btnBuyOne;
-        public GGraph m_btnBuyTen_eff;
         public GButton m_btnBuyTen;
         public GTextField m_txtRemainTimes;
+        public GGraph m_btnBuyTen_eff;
         public GGraph m_Special_eff;
         public GImage m_imgSpecial;
         public GGroup m_grpSpecial;
@@ -76,9 +76,9 @@ namespace UI.LuckyBox
             m_comCostOne = (UI_ComCost2)UI_ComCost2.Create(comp.GetChild("comCostOne"));
             m_comCostTen = (UI_ComCost2)UI_ComCost2.Create(comp.GetChild("comCostTen"));
             m_btnBuyOne = (GButton)comp.GetChild("btnBuyOne");
-            m_btnBuyTen_eff = (GGraph)comp.GetChild("btnBuyTen_eff");
             m_btnBuyTen = (GButton)comp.GetChild("btnBuyTen");
             m_txtRemainTimes = (GTextField)comp.GetChild("txtRemainTimes");
+            m_btnBuyTen_eff = (GGraph)comp.GetChild("btnBuyTen_eff");
             m_Special_eff = (GGraph)comp.GetChild("Special_eff");
             m_imgSpecial = (GImage)comp.GetChild("imgSpecial");
             m_grpSpecial = (GGroup)comp.GetChild("grpSpecial");
@@ -97,9 +97,9 @@ namespace UI.LuckyBox
             m_comCostTen.Dispose();
             m_comCostTen = null;
             m_btnBuyOne = null;
-            m_btnBuyTen_eff = null;
             m_btnBuyTen = null;
             m_txtRemainTimes = null;
+            m_btnBuyTen_eff = null;
             m_Special_eff = null;
             m_imgSpecial = null;
             m_grpSpecial = null;

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

@@ -14,6 +14,8 @@ namespace UI.LuckyBox
         public GLoader m_loaType;
         public GLoader m_loaProperty;
         public GTextField m_txtName;
+        public GGraph m_holder_get;
+        public Transition m_card_in;
         public const string URL = "ui://drx9d1usqdrt1a";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "ComCard";
@@ -68,6 +70,8 @@ namespace UI.LuckyBox
             m_loaType = (GLoader)comp.GetChild("loaType");
             m_loaProperty = (GLoader)comp.GetChild("loaProperty");
             m_txtName = (GTextField)comp.GetChild("txtName");
+            m_holder_get = (GGraph)comp.GetChild("holder_get");
+            m_card_in = comp.GetTransition("card_in");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -78,6 +82,8 @@ namespace UI.LuckyBox
             m_loaType = null;
             m_loaProperty = null;
             m_txtName = null;
+            m_holder_get = null;
+            m_card_in = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

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

@@ -13,9 +13,9 @@ namespace UI.LuckyBox
         public GGraph m_holder_cloud;
         public UI_ComCard m_comCard;
         public GButton m_btnPass;
-        public Transition m_t_open;
+        public Transition m_t_open_old;
         public Transition m_t_close;
-        public Transition m_t2;
+        public Transition m_t_open;
         public const string URL = "ui://drx9d1usqdrt19";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "LuckyBoxNewDressUI";
@@ -69,9 +69,9 @@ namespace UI.LuckyBox
             m_holder_cloud = (GGraph)comp.GetChild("holder_cloud");
             m_comCard = (UI_ComCard)UI_ComCard.Create(comp.GetChild("comCard"));
             m_btnPass = (GButton)comp.GetChild("btnPass");
-            m_t_open = comp.GetTransition("t_open");
+            m_t_open_old = comp.GetTransition("t_open_old");
             m_t_close = comp.GetTransition("t_close");
-            m_t2 = comp.GetTransition("t2");
+            m_t_open = comp.GetTransition("t_open");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -82,9 +82,9 @@ namespace UI.LuckyBox
             m_comCard.Dispose();
             m_comCard = null;
             m_btnPass = null;
-            m_t_open = null;
+            m_t_open_old = null;
             m_t_close = null;
-            m_t2 = null;
+            m_t_open = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 11 - 1
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxActivityView.cs

@@ -17,9 +17,18 @@ namespace GFGGame
         private ActivityOpenCfg _activityCfg;
         private LuckyBoxCfg _luckyBoxCfg;
         private int _activityId;
+        private Dictionary<string, EffectUI> _effectUIDic = new Dictionary<string, EffectUI>();
 
         public override void Dispose()
         {
+            // Clear Effect
+            foreach (var v in _effectUIDic)
+            {
+                EffectUIPool.Recycle(v.Value);
+            }
+
+            _effectUIDic.Clear();
+
             if (_valueBarController != null)
             {
                 _valueBarController.Dispose();
@@ -55,7 +64,8 @@ namespace GFGGame
             _ui.m_btnReward.onClick.Add(OnClickBtnReward);
             _ui.m_btnShop.onClick.Add(OnClickBtnShop);
             _ui.m_btnGiftBag.onClick.Add(OnClickBtnGiftBag);
-
+            _effectUIDic.Add("Button_public", EffectUIPool.CreateEffectUI(_ui.m_comBox.m_btnBuyTen_eff, "ui_LuckyBox", "Button_public"));
+            _effectUIDic.Add("Button_Text_DianCang", EffectUIPool.CreateEffectUI(_ui.m_comBox.m_Special_eff, "ui_LuckyBox", "Button_Text_DianCang"));
         }
         protected override void AddEventListener()
         {

+ 7 - 0
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxNewDressView.cs

@@ -23,6 +23,7 @@ namespace GFGGame
         private EffectUI _effectUI4;
         private EffectUI _effectUI5;
         private EffectUI _effectUI6;
+        private EffectUI _effectUI7;
 
         public override void Dispose()
         {
@@ -104,6 +105,11 @@ namespace GFGGame
                 EffectUIPool.Recycle(_effectUI6);
                 _effectUI6 = null;
             }
+            if (_effectUI7 != null)
+            {
+                EffectUIPool.Recycle(_effectUI7);
+                _effectUI7 = null;
+            }
             //_ui.m_btnPass.visible = _newRewardList.Count <= 1;
             _rewardList = _newRewardList.Count > 0 ? _newRewardList : _oldRewardList;
 
@@ -133,6 +139,7 @@ namespace GFGGame
                     _ui.m_comCard.m_holder.visible = true;
                     break;
             }
+            _effectUI7 = EffectUIPool.CreateEffectUI(_ui.m_comCard.m_holder_get, "ui_LuckyBox", "CK_OneBigCard_end");
 
             _ui.m_comCard.m_loaType.url = ResPathUtil.GetCommonGameResPath("hz_bq_shuxing_" + itemCfg.rarity);
             _ui.m_comCard.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);

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