Эх сурвалжийг харах

词牌技能升级添加特效

huangxiaoyue 1 жил өмнө
parent
commit
4b1663b41d

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Card/UI_CardSkillUI.cs

@@ -17,6 +17,7 @@ namespace UI.Card
         public GComponent m_comConsume;
         public GButton m_btnUpLv;
         public GGroup m_lvInfo;
+        public GGraph m_holderIcon;
         public const string URL = "ui://7l6lvkayrhha9m";
         public const string PACKAGE_NAME = "Card";
         public const string RES_NAME = "CardSkillUI";
@@ -74,6 +75,7 @@ namespace UI.Card
             m_comConsume = (GComponent)comp.GetChild("comConsume");
             m_btnUpLv = (GButton)comp.GetChild("btnUpLv");
             m_lvInfo = (GGroup)comp.GetChild("lvInfo");
+            m_holderIcon = (GGraph)comp.GetChild("holderIcon");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -89,6 +91,7 @@ namespace UI.Card
             m_comConsume = null;
             m_btnUpLv = null;
             m_lvInfo = null;
+            m_holderIcon = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 18 - 2
GameClient/Assets/Game/HotUpdate/Views/Card/CardSkillView.cs

@@ -14,6 +14,8 @@ namespace GFGGame
 
         private PassivitySkillCfg skillCfg;
         private PassivitySkillLvlCfg skillLvCfg;
+        private EffectUI _effectUI1;
+
         public override void Dispose()
         {
             if (_ui != null)
@@ -41,7 +43,7 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             base.AddEventListener();
-            EventAgent.AddEventListener(ConstMessage.CARD_UP_SKILL, UpdateView);
+            EventAgent.AddEventListener(ConstMessage.CARD_UP_SKILL, UpdateUpSkill);
             EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, UpdateView);
         }
         protected override void OnShown()
@@ -62,6 +64,7 @@ namespace GFGGame
 
             UpdateView();
         }
+
         private void UpdateView()
         {
             _ui.m_c1.selectedIndex = 0;
@@ -81,14 +84,25 @@ namespace GFGGame
             UI_ComCostCurrency.ProxyEnd();
             UpdateComLv(_ui.m_comNextLv, skillLv + 1, "下一级");
             _ui.m_listConsume.numItems = skillLvCfg.materiarsArr.Length;
+        }
 
+        private void UpdateUpSkill()
+        {
+            UpdateView();
+            if (_effectUI1 != null) {
+                EffectUIPool.Recycle(_effectUI1);
+                _effectUI1 = null;
+            }
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holderIcon, "ui_Activity", "SX_KP_JN_tx", 170);
         }
+
         private void UpdateComLv(UI_ComSkillDiscribe com, int lv, string title)
         {
             PassivitySkillLvlCfg skillLvCfg = PassivitySkillLvlCfgArray.Instance.GetCfgByskilllvlAndskillId(lv, _skillId);
             com.m_txtLv.text = title;
             com.m_txtDiscribe.text = skillLvCfg.describe;
         }
+
         private void RenderListStarConsumeItem(int index, GObject obj)
         {
 
@@ -152,11 +166,13 @@ namespace GFGGame
         protected override void OnHide()
         {
             base.OnHide();
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
         }
         protected override void RemoveEventListener()
         {
             base.RemoveEventListener();
-            EventAgent.RemoveEventListener(ConstMessage.CARD_UP_SKILL, UpdateView);
+            EventAgent.RemoveEventListener(ConstMessage.CARD_UP_SKILL, UpdateUpSkill);
             EventAgent.RemoveEventListener(ConstMessage.ITEM_CHANGED, UpdateView);
         }
     }

BIN
GameClient/Assets/ResIn/UI/Card/Card_fui.bytes