Browse Source

特效使用方式修改

huangxiaoyue 2 years ago
parent
commit
ab17f22e40

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Data/DecomposeDataManager.cs

@@ -57,7 +57,7 @@ namespace GFGGame
                     {
                     {
                         if(MateriarsInfo[0] == itemId)
                         if(MateriarsInfo[0] == itemId)
                             sum += MateriarsInfo[1];
                             sum += MateriarsInfo[1];
-                    }
+                    }  
                 }
                 }
             }
             }
             return sum;
             return sum;
@@ -91,7 +91,7 @@ namespace GFGGame
         public long ItemCanDecomposeCount(int itemId)
         public long ItemCanDecomposeCount(int itemId)
         {
         {
             //合成需要的数量
             //合成需要的数量
-            int synthesisNum = DeductSynthesisNeedNum(itemId);   
+            int synthesisNum = DeductSynthesisNeedNum(itemId);
             return ItemDataManager.GetItemNum(itemId) - 1 - synthesisNum;
             return ItemDataManager.GetItemNum(itemId) - 1 - synthesisNum;
         }
         }
         public void InitSuitSyntheticMaterias()
         public void InitSuitSyntheticMaterias()

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/CommonGame/RewardView.cs

@@ -120,7 +120,7 @@ namespace GFGGame
             item.m_comRewardItem.m_loaIcon.url = ResPathUtil.GetIconPath(iconRes, ext);
             item.m_comRewardItem.m_loaIcon.url = ResPathUtil.GetIconPath(iconRes, ext);
 
 
             item.m_comRewardItem.m_imgOnceBonus.visible = _listItemDatas[index].isOnceBonus;
             item.m_comRewardItem.m_imgOnceBonus.visible = _listItemDatas[index].isOnceBonus;
-            //string resPath = ResPathUtil.GetViewEffectPath("ui_ck", "ui_ck_zl");
+            //特效("ui_ck", "ui_ck_zl");
             int childIndex = _ui.m_comListReward.m_listReward.ItemIndexToChildIndex(index);
             int childIndex = _ui.m_comListReward.m_listReward.ItemIndexToChildIndex(index);
             if (_effects.Count <= childIndex)
             if (_effects.Count <= childIndex)
             {
             {

+ 18 - 28
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/EnduringGiftBoxView.cs

@@ -21,15 +21,11 @@ namespace GFGGame
         private int _maxTimes = 0;
         private int _maxTimes = 0;
         private string _message = "";
         private string _message = "";
         private List<ShopCfg> _shopCfgList = new List<ShopCfg>();
         private List<ShopCfg> _shopCfgList = new List<ShopCfg>();
-        private GameObject _gameObject1;
-        private GameObject _gameObject2;
-        private GameObject _gameObject3;
-        private GameObject _gameObject4;
 
 
-        private GoWrapper _wrapper1;
-        private GoWrapper _wrapper2;
-        private GoWrapper _wrapper3;
-        private GoWrapper _wrapper4;
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
+        private EffectUI _effectUI3;
+        private EffectUI _effectUI4;
 
 
         protected override void OnInit()
         protected override void OnInit()
         {
         {
@@ -48,6 +44,14 @@ namespace GFGGame
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+            EffectUIPool.Recycle(_effectUI3);
+            _effectUI3 = null;
+            EffectUIPool.Recycle(_effectUI4);
+            _effectUI4 = null;
             if (_ui != null)
             if (_ui != null)
             {
             {
                 _ui.Dispose();
                 _ui.Dispose();
@@ -85,34 +89,24 @@ namespace GFGGame
 
 
         private void AddEffect()
         private void AddEffect()
         {
         {
-            string resPath3;
+            //小人
             if (_itemId == ConstItemID.POWER)
             if (_itemId == ConstItemID.POWER)
             {
             {
-                resPath3 = ResPathUtil.GetViewEffectPath("ui_Activity", "Activity_people02");
+                _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holderBaby, "ui_Activity", "Activity_people02");
             }
             }
             else
             else
             {
             {
-                resPath3 = ResPathUtil.GetViewEffectPath("ui_Activity", "Activity_people01");
+                _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holderBaby, "ui_Activity", "Activity_people01");
             }
             }
 
 
-            //小人
-            SceneController.AddObjectToView(null, null, _ui.m_holderBaby, resPath3,
-                out _gameObject3, out _wrapper3);
-
             //爆发,大泡泡
             //爆发,大泡泡
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_Activity", "Activity_baofa");
-            SceneController.AddObjectToView(null, null, _ui.m_holderPaoMax, resPath1,
-                out _gameObject1, out _wrapper1);
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_holderPaoMax, "ui_Activity", "Activity_baofa");
 
 
             //持续的小泡泡
             //持续的小泡泡
-            string resPath2 = ResPathUtil.GetViewEffectPath("ui_Activity", "Activity_chixu");
-            SceneController.AddObjectToView(null, null, _ui.m_holderPaoMin, resPath2,
-                out _gameObject2, out _wrapper2);
+            _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_holderPaoMin, "ui_Activity", "Activity_chixu");
 
 
             //爆发时候的发光
             //爆发时候的发光
-            string resPath4 = ResPathUtil.GetViewEffectPath("ui_Activity", "Activity_glow");
-            SceneController.AddObjectToView(null, null, _ui.m_holderFg, resPath4,
-                out _gameObject4, out _wrapper4);
+            _effectUI4 = EffectUIPool.CreateEffectUI(_ui.m_holderFg, "ui_Activity", "Activity_glow");
         }
         }
 
 
         public void SetParams(int itemId, int count, Action onSuccess, string message = "", int type = 0)
         public void SetParams(int itemId, int count, Action onSuccess, string message = "", int type = 0)
@@ -537,10 +531,6 @@ namespace GFGGame
         protected override void OnHide()
         protected override void OnHide()
         {
         {
             this.RemoveEventListener();
             this.RemoveEventListener();
-            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
-            SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
-            SceneController.DestroyObjectFromView(_gameObject3, _wrapper3);
-            SceneController.DestroyObjectFromView(_gameObject4, _wrapper4);
             base.Hide();
             base.Hide();
             _onSuccess = null;
             _onSuccess = null;
             Timers.inst.Remove(CheckGuide);
             Timers.inst.Remove(CheckGuide);

+ 28 - 41
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxNewDressView.cs

@@ -18,28 +18,28 @@ namespace GFGGame
         // private List<ItemData> _showRewardList = new List<ItemData>();
         // private List<ItemData> _showRewardList = new List<ItemData>();
 
 
         // private int _type = 0;//弹窗类型:0可跳过,1:首次获得物品不可跳过,2首次获得物品不可跳过,不弹获得套装界面
         // private int _type = 0;//弹窗类型:0可跳过,1:首次获得物品不可跳过,2首次获得物品不可跳过,不弹获得套装界面
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
+        private EffectUI _effectUI3;
+        private EffectUI _effectUI4;
+        private EffectUI _effectUI5;
+        private EffectUI _effectUI6;
 
 
-        private GameObject gameObject;
-        private GoWrapper wrapper;
-        private GameObject gameObject1;
-        private GoWrapper wrapper1;
-        private GameObject gameObject2;
-        private GoWrapper wrapper2;
-        private GameObject _gameObject0;
-        private GameObject _gameObject1;
-        private GameObject _gameObject2;
-        private GoWrapper _wrapper0;
-        private GoWrapper _wrapper1;
-        private GoWrapper _wrapper2;
         public override void Dispose()
         public override void Dispose()
         {
         {
             base.Dispose();
             base.Dispose();
-            SceneController.DestroyObjectFromView(gameObject, wrapper);
-            SceneController.DestroyObjectFromView(gameObject1, wrapper1);
-            SceneController.DestroyObjectFromView(gameObject2, wrapper2);
-            SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
-            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
-            SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+            EffectUIPool.Recycle(_effectUI3);
+            _effectUI3 = null;
+            EffectUIPool.Recycle(_effectUI4);
+            _effectUI4 = null;
+            EffectUIPool.Recycle(_effectUI5);
+            _effectUI5 = null;
+            EffectUIPool.Recycle(_effectUI6);
+            _effectUI6 = null;
             if (_ui != null)
             if (_ui != null)
             {
             {
                 _ui.Dispose();
                 _ui.Dispose();
@@ -57,25 +57,18 @@ namespace GFGGame
 
 
             this.modal = true;
             this.modal = true;
 
 
-
             _ui.m_loaBg.onTouchBegin.Add(OnClickBg);
             _ui.m_loaBg.onTouchBegin.Add(OnClickBg);
             _ui.m_btnPass.onClick.Add(Hide);
             _ui.m_btnPass.onClick.Add(Hide);
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("zx_bg");
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("zx_bg");
 
 
-
-
             UpdateEffect();
             UpdateEffect();
         }
         }
         private void UpdateEffect()
         private void UpdateEffect()
         {
         {
-            string resPath = ResPathUtil.GetViewEffectPath("ui_ck", "ui_ck_zs");
-            SceneController.AddObjectToView(gameObject, null, _ui.m_comCard.m_holder, resPath, out gameObject, out wrapper);
-            string resPath0 = ResPathUtil.GetViewEffectPath("ui_LuckyBox", "bg_liuxing");
-            SceneController.AddObjectToView(null, null, _ui.m_holder_star, resPath0, out _gameObject0, out _wrapper0);
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_LuckyBox", "CK_UI");
-            SceneController.AddObjectToView(null, null, _ui.m_holder_bg, resPath1, out _gameObject1, out _wrapper1);
-            string resPath2 = ResPathUtil.GetViewEffectPath("ui_LuckyBox", "bg_cloud");
-            SceneController.AddObjectToView(null, null, _ui.m_holder_cloud, resPath2, out _gameObject2, out _wrapper2);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_comCard.m_holder, "ui_ck", "ui_ck_zs");
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_holder_star, "ui_LuckyBox", "bg_liuxing");
+            _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_holder_bg, "ui_LuckyBox", "CK_UI");
+            _effectUI4 = EffectUIPool.CreateEffectUI(_ui.m_holder_cloud, "ui_LuckyBox", "bg_cloud");
         }
         }
         protected override void OnShown()
         protected override void OnShown()
         {
         {
@@ -117,29 +110,23 @@ namespace GFGGame
             switch (itemCfg.rarity)
             switch (itemCfg.rarity)
             {
             {
                 case ConstDressRarity.Rarity_TIANYI:
                 case ConstDressRarity.Rarity_TIANYI:
-                    resPath = ResPathUtil.GetViewEffectPath("ui_LuckyBox", "CK_Yellow_01");
-                    SceneController.AddObjectToView(gameObject1, wrapper1, _ui.m_comCard.m_holder, resPath, out gameObject1, out wrapper1);
+                    _effectUI5 = EffectUIPool.CreateEffectUI(_ui.m_comCard.m_holder, "ui_LuckyBox", "CK_Yellow_01");
                     _ui.m_comCard.m_holder.visible = true;
                     _ui.m_comCard.m_holder.visible = true;
-                    resPath1 = ResPathUtil.GetViewEffectPath("ui_LuckyBox", "CK_Yellow_01_top");
-                    SceneController.AddObjectToView(gameObject2, wrapper2, _ui.m_comCard.m_holder1, resPath1, out gameObject2, out wrapper2);
+                    _effectUI6 = EffectUIPool.CreateEffectUI(_ui.m_comCard.m_holder1, "ui_LuckyBox", "CK_Yellow_01_top");
                     _ui.m_comCard.m_holder1.visible = true;
                     _ui.m_comCard.m_holder1.visible = true;
                     break;
                     break;
                 case ConstDressRarity.Rarity_DIANCANG:
                 case ConstDressRarity.Rarity_DIANCANG:
-                    resPath = ResPathUtil.GetViewEffectPath("ui_LuckyBox", "CK_Purple_02");
-                    SceneController.AddObjectToView(gameObject1, wrapper1, _ui.m_comCard.m_holder, resPath, out gameObject1, out wrapper1);
+                    _effectUI5 = EffectUIPool.CreateEffectUI(_ui.m_comCard.m_holder, "ui_LuckyBox", "CK_Purple_02");
                     _ui.m_comCard.m_holder.visible = true;
                     _ui.m_comCard.m_holder.visible = true;
-                    resPath1 = ResPathUtil.GetViewEffectPath("ui_LuckyBox", "CK_Purple_02_top");
-                    SceneController.AddObjectToView(gameObject2, wrapper2, _ui.m_comCard.m_holder1, resPath1, out gameObject2, out wrapper2);
+                    _effectUI6 = EffectUIPool.CreateEffectUI(_ui.m_comCard.m_holder1, "ui_LuckyBox", "CK_Purple_02_top");
                     _ui.m_comCard.m_holder1.visible = true;
                     _ui.m_comCard.m_holder1.visible = true;
                     break;
                     break;
                 case ConstDressRarity.Rarity_ZHENXI:
                 case ConstDressRarity.Rarity_ZHENXI:
-                    resPath = ResPathUtil.GetViewEffectPath("ui_LuckyBox", "CK_Bule_03");
-                    SceneController.AddObjectToView(gameObject1, wrapper1, _ui.m_comCard.m_holder, resPath, out gameObject1, out wrapper1);
+                    _effectUI5 = EffectUIPool.CreateEffectUI(_ui.m_comCard.m_holder, "ui_LuckyBox", "CK_Bule_03");
                     _ui.m_comCard.m_holder.visible = true;
                     _ui.m_comCard.m_holder.visible = true;
                     break;
                     break;
                 case ConstDressRarity.Rarity_FANPIN:
                 case ConstDressRarity.Rarity_FANPIN:
-                    resPath = ResPathUtil.GetViewEffectPath("ui_LuckyBox", "CK_grey_04");
-                    SceneController.AddObjectToView(gameObject1, wrapper1, _ui.m_comCard.m_holder, resPath, out gameObject1, out wrapper1);
+                    _effectUI5 = EffectUIPool.CreateEffectUI(_ui.m_comCard.m_holder, "ui_LuckyBox", "CK_grey_04");
                     _ui.m_comCard.m_holder.visible = true;
                     _ui.m_comCard.m_holder.visible = true;
                     break;
                     break;
             }
             }

+ 13 - 16
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxStarView.cs

@@ -21,8 +21,7 @@ namespace GFGGame
         // private List<GoWrapper> _wrappers = new List<GoWrapper>();
         // private List<GoWrapper> _wrappers = new List<GoWrapper>();
         // private List<GameObject> _gameObjects1 = new List<GameObject>();
         // private List<GameObject> _gameObjects1 = new List<GameObject>();
         // private List<GoWrapper> _wrappers1 = new List<GoWrapper>();
         // private List<GoWrapper> _wrappers1 = new List<GoWrapper>();
-        private Dictionary<int, List<GameObject>> dicGameobj = new Dictionary<int, List<GameObject>>();
-        private Dictionary<int, List<GoWrapper>> dicWraper = new Dictionary<int, List<GoWrapper>>();
+        private Dictionary<int, List<EffectUI>> dicEffect = new Dictionary<int, List<EffectUI>>();
         private List<GameObject> lineObj = new List<GameObject>();
         private List<GameObject> lineObj = new List<GameObject>();
         private List<GoWrapper> lineWrapper = new List<GoWrapper>();
         private List<GoWrapper> lineWrapper = new List<GoWrapper>();
         private EffectUI _effectUI1;
         private EffectUI _effectUI1;
@@ -69,13 +68,13 @@ namespace GFGGame
                 star = _ui.target.GetChild(string.Format("comStar{0}_{1}_{2}", _ui.m_ctrlBuyType.selectedIndex, _ui.m_ctrlRewardsType.selectedIndex, index));
                 star = _ui.target.GetChild(string.Format("comStar{0}_{1}_{2}", _ui.m_ctrlBuyType.selectedIndex, _ui.m_ctrlRewardsType.selectedIndex, index));
                 UI_ComStar.ProxyEnd();
                 UI_ComStar.ProxyEnd();
             }
             }
-            foreach (int key in dicGameobj.Keys)
+            foreach (int key in dicEffect.Keys)
             {
             {
-                List<GameObject> value = dicGameobj[key];
-                List<GoWrapper> wrappersValue = dicWraper[key];
+                List<EffectUI> value = dicEffect[key];
                 for (int i = 0; i < value.Count; i++)
                 for (int i = 0; i < value.Count; i++)
                 {
                 {
-                    SceneController.DestroyObjectFromView(value[i], wrappersValue[i]);
+                    EffectUIPool.Recycle(value[i]);
+                    value[i] = null;
                 }
                 }
             }
             }
             for (int i = 0; i < lineObj.Count; i++)
             for (int i = 0; i < lineObj.Count; i++)
@@ -85,8 +84,7 @@ namespace GFGGame
 
 
             notClickComStars.Clear();
             notClickComStars.Clear();
             clickComStars.Clear();
             clickComStars.Clear();
-            dicGameobj.Clear();
-            dicWraper.Clear();
+            dicEffect.Clear();
 
 
             Timers.inst.Remove(CheckGuide);
             Timers.inst.Remove(CheckGuide);
             Debug.Log("OnHide  LuckyBoxStarView");
             Debug.Log("OnHide  LuckyBoxStarView");
@@ -181,15 +179,12 @@ namespace GFGGame
             else
             else
             {
             {
                 gcom = UIPackage.CreateObject("LuckyBox", "ComHolder").asCom;
                 gcom = UIPackage.CreateObject("LuckyBox", "ComHolder").asCom;
-                string resPath = ResPathUtil.GetViewEffectPath("ui_LuckyBox", name);
-                SceneController.AddObjectToView(null, null, gcom.GetChild("holder").asGraph, resPath, out GameObject gameObject, out GoWrapper wrapper);
-                if (!dicGameobj.ContainsKey(index))
+                EffectUI _effectUI1 = EffectUIPool.CreateEffectUI(gcom.GetChild("holder").asGraph, "ui_LuckyBox", name);
+                if (!dicEffect.ContainsKey(index))
                 {
                 {
-                    dicGameobj.Add(index, new List<GameObject>());
-                    dicWraper.Add(index, new List<GoWrapper>());
+                    dicEffect.Add(index, new List<EffectUI>());
                 }
                 }
-                dicGameobj[index].Add(gameObject);
-                dicWraper[index].Add(wrapper);
+                dicEffect[index].Add(_effectUI1);
             }
             }
             return gcom;
             return gcom;
         }
         }
@@ -228,8 +223,10 @@ namespace GFGGame
                     UI_ComStar comStar = UI_ComStar.Proxy(comStars[i]);
                     UI_ComStar comStar = UI_ComStar.Proxy(comStars[i]);
                     comStar.target.GetChildAt(2).asCom.visible = true;
                     comStar.target.GetChildAt(2).asCom.visible = true;
                     // comStar.target.GetChildAt(1).asCom.visible = false;
                     // comStar.target.GetChildAt(1).asCom.visible = false;
-                    string resPath = ResPathUtil.GetViewEffectPath("ui_LuckyBox", _isLuckyBox ? "LINE_Bule" : "LINE");
+                    string resPath = _isLuckyBox ? "LINE_Bule" : "LINE";
                     SceneController.AddObjectToView(null, null, comStar.m_comLine.m_holder, resPath, out GameObject gameObject, out GoWrapper wrapper);
                     SceneController.AddObjectToView(null, null, comStar.m_comLine.m_holder, resPath, out GameObject gameObject, out GoWrapper wrapper);
+                    _effectUI1 = EffectUIPool.CreateEffectUI(comStar.m_comLine.m_holder, "ui_fight_new", resPath);
+
                     lineObj.Add(gameObject);
                     lineObj.Add(gameObject);
                     lineWrapper.Add(wrapper);
                     lineWrapper.Add(wrapper);
                     UI_ComStar.ProxyEnd();
                     UI_ComStar.ProxyEnd();

+ 33 - 47
GameClient/Assets/Game/HotUpdate/Views/MainStory/ArenaFightResultView.cs

@@ -13,41 +13,34 @@ namespace GFGGame
         private UI_ArenaFightResultUI _ui;
         private UI_ArenaFightResultUI _ui;
         private GameObject _scenePrefab;
         private GameObject _scenePrefab;
         private GameObject _sceneObject;
         private GameObject _sceneObject;
-        private GameObject _gameObject0;
-        private GameObject _gameObject1;
-        private GameObject _gameObject2;
-        private GameObject _gameObject3;
-        private GameObject _gameObject4;
-        private GameObject _gameObject5;
-        private GameObject _gameObject6;
-        private GameObject _gameObject7;
-        private GameObject _gameObject8;
-        private GameObject _gameObject9;
-        private GameObject _gameObject10;
-        private GameObject _gameObject11;
-        private GoWrapper _wrapper0;
-        private GoWrapper _wrapper1;
-        private GoWrapper _wrapper2;
-        private GoWrapper _wrapper3;
-        private GoWrapper _wrapper4;
-        private GoWrapper _wrapper5;
-        private GoWrapper _wrapper6;
-        private GoWrapper _wrapper7;
-        private GoWrapper _wrapper8;
-        private GoWrapper _wrapper9;
-        private GoWrapper _wrapper10;
-        private GoWrapper _wrapper11;
+
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
+        private EffectUI _effectUI3;
+        private EffectUI _effectUI4;
+        private EffectUI _effectUI5;
+        private EffectUI _effectUI6;
+        private EffectUI _effectUI7;
+        private EffectUI _effectUI8;
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
-            SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
-            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
-            SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
-            SceneController.DestroyObjectFromView(_gameObject3, _wrapper3);
-            SceneController.DestroyObjectFromView(_gameObject4, _wrapper4);
-            SceneController.DestroyObjectFromView(_gameObject5, _wrapper5);
-            SceneController.DestroyObjectFromView(_gameObject6, _wrapper6);
-            SceneController.DestroyObjectFromView(_gameObject7, _wrapper7);
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null; 
+            EffectUIPool.Recycle(_effectUI3);
+            _effectUI3 = null; 
+            EffectUIPool.Recycle(_effectUI4);
+            _effectUI4 = null;
+            EffectUIPool.Recycle(_effectUI5);
+            _effectUI5 = null; 
+            EffectUIPool.Recycle(_effectUI6);
+            _effectUI6 = null;
+            EffectUIPool.Recycle(_effectUI7);
+            _effectUI7 = null; 
+            EffectUIPool.Recycle(_effectUI8);
+            _effectUI8 = null;
             if (_ui != null)
             if (_ui != null)
             {
             {
                 _ui.Dispose();
                 _ui.Dispose();
@@ -77,21 +70,14 @@ namespace GFGGame
         }
         }
         private void AddEffect()
         private void AddEffect()
         {
         {
-            string resPath0 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_lose");
-            SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderResult0, resPath0, out _gameObject0, out _wrapper0);
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_qualified");
-            SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderResult1, resPath1, out _gameObject1, out _wrapper1);
-            string resPath2 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_good");
-            SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderResult2, resPath2, out _gameObject2, out _wrapper2);
-            string resPath3 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_Perfect");
-            SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderResult3, resPath3, out _gameObject3, out _wrapper3);
-            string resPath4 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_Text_kuang");
-            SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderScore, resPath4, out _gameObject4, out _wrapper4);
-            string resPath5 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_STAR");
-            SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderStar3, resPath5, out _gameObject7, out _wrapper7);
-            SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderStar2, resPath5, out _gameObject6, out _wrapper6);
-            SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderStar1, resPath5, out _gameObject5, out _wrapper5);
-
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderResult0, "ui_fight_new", "ZDJS_lose");
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderResult1, "ui_fight_new", "ZDJS_qualified");
+            _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderResult2, "ui_fight_new", "ZDJS_good");
+            _effectUI4 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderResult3, "ui_fight_new", "ZDJS_Perfect");
+            _effectUI5 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderScore, "ui_fight_new", "ZDJS_Text_kuang");
+            _effectUI6 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderStar3, "ui_fight_new", "ZDJS_STAR");
+            _effectUI7 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderStar2, "ui_fight_new", "ZDJS_STAR");
+            _effectUI8 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderStar1, "ui_fight_new", "ZDJS_STAR");
         }
         }
         protected override void OnShown()
         protected override void OnShown()
         {
         {

+ 72 - 98
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleScoreView.cs

@@ -29,44 +29,24 @@ namespace GFGGame
         private bool _isAllPerfect = false;//登峰造极中
         private bool _isAllPerfect = false;//登峰造极中
         private bool tryGuide = false;
         private bool tryGuide = false;
 
 
-        private GameObject _gameObject0;
-        private GameObject _gameObject1;
-        private GameObject _gameObject2;
-        private GameObject _gameObject3;
-        private GameObject _gameObject4;
-        private GameObject _gameObject41;
-        private GameObject _gameObject5;
-        private GameObject _gameObject6;
-        private GameObject _gameObject7;
-        private GameObject _gameObject8;
-        private GameObject _gameObject9;
-        private GameObject _gameObject10;
-        private GameObject _gameObject11;
-        private GameObject _gameObject12;
-        private GameObject _gameObject13;
-        private GameObject _gameObject14;
-        private GameObject _gameObject15;
-        private GameObject _gameObject16;
-
-        private GoWrapper _wrapper0;
-        private GoWrapper _wrapper1;
-        private GoWrapper _wrapper2;
-        private GoWrapper _wrapper3;
-        private GoWrapper _wrapper4;
-        private GoWrapper _wrapper41;
-        private GoWrapper _wrapper5;
-        private GoWrapper _wrapper6;
-        private GoWrapper _wrapper7;
-        private GoWrapper _wrapper8;
-        private GoWrapper _wrapper9;
-        private GoWrapper _wrapper10;
-        private GoWrapper _wrapper11;
-        private GoWrapper _wrapper12;
-        private GoWrapper _wrapper13;
-        private GoWrapper _wrapper14;
-        private GoWrapper _wrapper15;
-        private GoWrapper _wrapper16;
-
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
+        private EffectUI _effectUI3;
+        private EffectUI _effectUI4;
+        private EffectUI _effectUI5;
+        private EffectUI _effectUI6;
+        private EffectUI _effectUI7;
+        private EffectUI _effectUI8;
+        private EffectUI _effectUI9;
+        private EffectUI _effectUI10;
+        private EffectUI _effectUI11;
+        private EffectUI _effectUI12;
+        private EffectUI _effectUI13;
+        private EffectUI _effectUI14;
+        private EffectUI _effectUI15;
+        private EffectUI _effectUI16;
+        private EffectUI _effectUI17;
+        private EffectUI _effectUI18;
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
@@ -75,25 +55,42 @@ namespace GFGGame
             //     GameObject.Destroy(_sceneObject);
             //     GameObject.Destroy(_sceneObject);
             //     _sceneObject = null;
             //     _sceneObject = null;
             // }
             // }
-            SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
-            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
-            SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
-            SceneController.DestroyObjectFromView(_gameObject3, _wrapper3);
-            SceneController.DestroyObjectFromView(_gameObject4, _wrapper4);
-            SceneController.DestroyObjectFromView(_gameObject41, _wrapper41);
-            SceneController.DestroyObjectFromView(_gameObject5, _wrapper5);
-            SceneController.DestroyObjectFromView(_gameObject6, _wrapper6);
-            SceneController.DestroyObjectFromView(_gameObject7, _wrapper7);
-            SceneController.DestroyObjectFromView(_gameObject8, _wrapper8);
-            SceneController.DestroyObjectFromView(_gameObject9, _wrapper9);
-            SceneController.DestroyObjectFromView(_gameObject10, _wrapper10);
-            SceneController.DestroyObjectFromView(_gameObject11, _wrapper11);
-            SceneController.DestroyObjectFromView(_gameObject12, _wrapper12);
-            SceneController.DestroyObjectFromView(_gameObject13, _wrapper13);
-            SceneController.DestroyObjectFromView(_gameObject14, _wrapper14);
-            SceneController.DestroyObjectFromView(_gameObject15, _wrapper15);
-            SceneController.DestroyObjectFromView(_gameObject16, _wrapper16);
-
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+            EffectUIPool.Recycle(_effectUI3);
+            _effectUI3 = null;
+            EffectUIPool.Recycle(_effectUI4);
+            _effectUI4 = null; 
+            EffectUIPool.Recycle(_effectUI5);
+            _effectUI5 = null;
+            EffectUIPool.Recycle(_effectUI6);
+            _effectUI6 = null;
+            EffectUIPool.Recycle(_effectUI7);
+            _effectUI7 = null;
+            EffectUIPool.Recycle(_effectUI8);
+            _effectUI8 = null;
+            EffectUIPool.Recycle(_effectUI9);
+            _effectUI9 = null;
+            EffectUIPool.Recycle(_effectUI10);
+            _effectUI10 = null;
+            EffectUIPool.Recycle(_effectUI11);
+            _effectUI11 = null;
+            EffectUIPool.Recycle(_effectUI12);
+            _effectUI12 = null;
+            EffectUIPool.Recycle(_effectUI13);
+            _effectUI13 = null;
+            EffectUIPool.Recycle(_effectUI14);
+            _effectUI14 = null;
+            EffectUIPool.Recycle(_effectUI15);
+            _effectUI15 = null;
+            EffectUIPool.Recycle(_effectUI16);
+            _effectUI16 = null;
+            EffectUIPool.Recycle(_effectUI17);
+            _effectUI17 = null;
+            EffectUIPool.Recycle(_effectUI18);
+            _effectUI18 = null;
             if (_ui != null)
             if (_ui != null)
             {
             {
                 _ui.Dispose();
                 _ui.Dispose();
@@ -128,47 +125,24 @@ namespace GFGGame
         }
         }
         private void AddEffect()
         private void AddEffect()
         {
         {
-            string resPath = ResPathUtil.GetViewEffectPath("ui_fight_new", "upgrade01");
-            SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comFirstScore.m_holder, resPath, out _gameObject0, out _wrapper0);
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_fight_new", "upgrade02");
-            SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comSecondScore.m_holder, resPath1, out _gameObject1, out _wrapper1);
-            string resPath2 = ResPathUtil.GetViewEffectPath("ui_fight_new", "upgrade03");
-            SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comThirdScore.m_holder, resPath2, out _gameObject2, out _wrapper2);
-            string resPath3 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Progress_head");
-            SceneController.AddObjectToView(null, null, _ui.m_proScore.m_holder, resPath3, out _gameObject3, out _wrapper3);
-            string resPath4 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Progress_fixed");
-            SceneController.AddObjectToView(null, null, _ui.m_proScore.m_holder1, resPath4, out _gameObject4, out _wrapper4);
-            string resPath41 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Progress_liuguang");
-            SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comBar.m_holder, resPath41, out _gameObject41, out _wrapper41);
-
-            // string resPath5 = ResPathUtil.GetViewEffectPath("ui_fight_new", "zd_df_dfzj");
-            // SceneController.AddObjectToView(null, null, _ui.m_comAllPerfect.m_holder, resPath5, out _gameObject5, out _wrapper5);
-
-            string resPath6 = ResPathUtil.GetViewEffectPath("ui_fight_new", "bottom_appear");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holderNormal, resPath6, out _gameObject6, out _wrapper6);
-            string resPath7 = ResPathUtil.GetViewEffectPath("ui_fight_new", "circle");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holderCircle, resPath7, out _gameObject7, out _wrapper7);
-            string resPath8 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Lose_animation");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holder0, resPath8, out _gameObject8, out _wrapper8);
-            string resPath9 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Good_animation");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holder1, resPath9, out _gameObject9, out _wrapper9);
-            string resPath10 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Perfect_animation");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holder2, resPath10, out _gameObject10, out _wrapper10);
-            string resPath11 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Tail");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holderResult, resPath11, out _gameObject11, out _wrapper11);
-            string resPath12 = ResPathUtil.GetViewEffectPath("ui_fight_new", "botton_Highlight");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holderHigh, resPath12, out _gameObject12, out _wrapper12);
-
-            string resPath13 = ResPathUtil.GetViewEffectPath("ui_fight_new", "loop_tx");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comAllPerfect.m_holderLoop, resPath13, out _gameObject13, out _wrapper13);
-            string resPath14 = ResPathUtil.GetViewEffectPath("ui_fight_new", "3S_textAppear01");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comAllPerfect.m_holder, resPath14, out _gameObject14, out _wrapper14);
-            string resPath15 = ResPathUtil.GetViewEffectPath("ui_fight_new", "smoke_Approach");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comAllPerfect.m_holderSmokeIn, resPath15, out _gameObject15, out _wrapper15);
-            string resPath16 = ResPathUtil.GetViewEffectPath("ui_fight_new", "smoke_out");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comAllPerfect.m_holderSmokeOut, resPath16, out _gameObject16, out _wrapper16);
-
-
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_comFirstScore.m_holder, "ui_fight_new", "upgrade01");
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_comSecondScore.m_holder, "ui_fight_new", "upgrade02");
+            _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_comThirdScore.m_holder, "ui_fight_new", "upgrade03");
+            _effectUI4 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_holder, "ui_fight_new", "Progress_head");
+            _effectUI5 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_holder1, "ui_fight_new", "Progress_fixed");
+            _effectUI6 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_comBar.m_holder, "ui_fight_new", "Progress_liuguang");
+            //_effectUI7 = EffectUIPool.CreateEffectUI(_ui.m_comAllPerfect.m_holder, "ui_fight_new", "zd_df_dfzj");
+            _effectUI8 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holderNormal, "ui_fight_new", "bottom_appear");
+            _effectUI9 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holderCircle, "ui_fight_new", "circle");
+            _effectUI10 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holder0, "ui_fight_new", "Lose_animation");
+            _effectUI11 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holder1, "ui_fight_new", "Good_animation");
+            _effectUI12 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holder2, "ui_fight_new", "Perfect_animation");
+            _effectUI13 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holderResult, "ui_fight_new", "Tail");
+            _effectUI14 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holderHigh, "ui_fight_new", "botton_Highlight");
+            _effectUI15 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comAllPerfect.m_holderLoop, "ui_fight_new", "loop_tx");
+            _effectUI16 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comAllPerfect.m_holder, "ui_fight_new", "3S_textAppear01");
+            _effectUI17 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comAllPerfect.m_holderSmokeIn, "ui_fight_new", "smoke_Approach");
+            _effectUI18 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comAllPerfect.m_holderSmokeOut, "ui_fight_new", "smoke_out");
         }
         }
         protected override void AddEventListener()
         protected override void AddEventListener()
         {
         {

+ 60 - 84
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

@@ -18,38 +18,22 @@ namespace GFGGame
         private GameObject _scenePrefab;
         private GameObject _scenePrefab;
         private GameObject _sceneObject;
         private GameObject _sceneObject;
 
 
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
+        private EffectUI _effectUI3;
+        private EffectUI _effectUI4;
+        private EffectUI _effectUI5;
+        private EffectUI _effectUI6;
+        private EffectUI _effectUI7;
+        private EffectUI _effectUI8;
+        private EffectUI _effectUI9;
+        private EffectUI _effectUI10;
+        private EffectUI _effectUI11;
+        private EffectUI _effectUI12;
+        private EffectUI _effectUI13;
+        private EffectUI _effectUI14;
+        private EffectUI _effectUI15;
 
 
-        private GameObject _gameObject1;
-        private GameObject _gameObject2;
-        private GameObject _gameObject21;
-        private GameObject _gameObject5;
-        private GameObject _gameObject6;
-        private GameObject _gameObject7;
-        private GameObject _gameObject8;
-        private GameObject _gameObject9;
-        private GameObject _gameObject10;
-        private GameObject _gameObject11;
-        private GameObject _gameObject12;
-        private GameObject _gameObject13;
-        private GameObject _gameObject14;
-        private GameObject _gameObject15;
-        private GameObject _gameObject16;
-
-        private GoWrapper _wrapper2;
-        private GoWrapper _wrapper21;
-        private GoWrapper _wrapper1;
-        private GoWrapper _wrapper5;
-        private GoWrapper _wrapper6;
-        private GoWrapper _wrapper7;
-        private GoWrapper _wrapper8;
-        private GoWrapper _wrapper9;
-        private GoWrapper _wrapper10;
-        private GoWrapper _wrapper11;
-        private GoWrapper _wrapper12;
-        private GoWrapper _wrapper13;
-        private GoWrapper _wrapper14;
-        private GoWrapper _wrapper15;
-        private GoWrapper _wrapper16;
         private NTexture _nTexture;
         private NTexture _nTexture;
         private bool _isAutoPlay = false;
         private bool _isAutoPlay = false;
         // private float _speed = 1;
         // private float _speed = 1;
@@ -71,24 +55,36 @@ namespace GFGGame
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
-
-            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
-            SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
-            SceneController.DestroyObjectFromView(_gameObject21, _wrapper21);
-            SceneController.DestroyObjectFromView(_gameObject5, _wrapper5);
-            SceneController.DestroyObjectFromView(_gameObject6, _wrapper6);
-            SceneController.DestroyObjectFromView(_gameObject7, _wrapper7);
-            SceneController.DestroyObjectFromView(_gameObject8, _wrapper8);
-            SceneController.DestroyObjectFromView(_gameObject9, _wrapper9);
-            SceneController.DestroyObjectFromView(_gameObject10, _wrapper10);
-            SceneController.DestroyObjectFromView(_gameObject11, _wrapper11);
-            SceneController.DestroyObjectFromView(_gameObject12, _wrapper12);
-            SceneController.DestroyObjectFromView(_gameObject12, _wrapper12);
-            SceneController.DestroyObjectFromView(_gameObject13, _wrapper13);
-            SceneController.DestroyObjectFromView(_gameObject14, _wrapper14);
-            SceneController.DestroyObjectFromView(_gameObject15, _wrapper15);
-            SceneController.DestroyObjectFromView(_gameObject16, _wrapper16);
-
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+            EffectUIPool.Recycle(_effectUI3);
+            _effectUI3 = null;
+            EffectUIPool.Recycle(_effectUI4);
+            _effectUI4 = null;
+            EffectUIPool.Recycle(_effectUI5);
+            _effectUI5 = null;
+            EffectUIPool.Recycle(_effectUI6);
+            _effectUI6 = null;
+            EffectUIPool.Recycle(_effectUI7);
+            _effectUI7 = null;
+            EffectUIPool.Recycle(_effectUI8);
+            _effectUI8 = null;
+            EffectUIPool.Recycle(_effectUI9);
+            _effectUI9 = null;
+            EffectUIPool.Recycle(_effectUI10);
+            _effectUI10 = null;
+            EffectUIPool.Recycle(_effectUI11);
+            _effectUI11 = null;
+            EffectUIPool.Recycle(_effectUI12);
+            _effectUI12 = null;
+            EffectUIPool.Recycle(_effectUI13);
+            _effectUI13 = null;
+            EffectUIPool.Recycle(_effectUI14);
+            _effectUI14 = null;
+            EffectUIPool.Recycle(_effectUI15);
+            _effectUI15 = null;
             if (_ui != null)
             if (_ui != null)
             {
             {
                 _ui.Dispose();
                 _ui.Dispose();
@@ -98,41 +94,21 @@ namespace GFGGame
         }
         }
         private void AddEffect()
         private void AddEffect()
         {
         {
-            string resPath3 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Progress_fixed");
-            SceneController.AddObjectToView(_gameObject1, null, _ui.m_proScore.m_holder1, resPath3, out _gameObject1, out _wrapper1);
-            string resPath4 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Progress_head");
-            SceneController.AddObjectToView(_gameObject2, null, _ui.m_proScore.m_holder, resPath4, out _gameObject2, out _wrapper2);
-            string resPath41 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Progress_liuguang");
-            SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comBar.m_holder, resPath41, out _gameObject21, out _wrapper21);
-
-            string resPath6 = ResPathUtil.GetViewEffectPath("ui_fight_new", "bottom_appear");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holderNormal, resPath6, out _gameObject6, out _wrapper6);
-            string resPath7 = ResPathUtil.GetViewEffectPath("ui_fight_new", "circle");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holderCircle, resPath7, out _gameObject7, out _wrapper7);
-            // string resPath5 = ResPathUtil.GetViewEffectPath("ui_fight_new", "zd_df_dfzj");
-            // SceneController.AddObjectToView(null, null, _ui.m_comAllPerfect.m_holder, resPath5, out _gameObject5, out _wrapper5);
-
-
-            string resPath8 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Lose_animation");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holder0, resPath8, out _gameObject8, out _wrapper8);
-
-            string resPath9 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Good_animation");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holder1, resPath9, out _gameObject9, out _wrapper9);
-            string resPath10 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Perfect_animation");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holder2, resPath10, out _gameObject10, out _wrapper10);
-            string resPath11 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Tail");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holderResult, resPath11, out _gameObject11, out _wrapper11);
-            string resPath12 = ResPathUtil.GetViewEffectPath("ui_fight_new", "botton_Highlight");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holderHigh, resPath12, out _gameObject12, out _wrapper12);
-
-            string resPath13 = ResPathUtil.GetViewEffectPath("ui_fight_new", "loop_tx");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comAllPerfect.m_holderLoop, resPath13, out _gameObject13, out _wrapper13);
-            string resPath14 = ResPathUtil.GetViewEffectPath("ui_fight_new", "3S_textAppear01");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comAllPerfect.m_holder, resPath14, out _gameObject14, out _wrapper14);
-            string resPath15 = ResPathUtil.GetViewEffectPath("ui_fight_new", "smoke_Approach");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comAllPerfect.m_holderSmokeIn, resPath15, out _gameObject15, out _wrapper15);
-            string resPath16 = ResPathUtil.GetViewEffectPath("ui_fight_new", "smoke_out");
-            SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comAllPerfect.m_holderSmokeOut, resPath16, out _gameObject16, out _wrapper16);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_holder1, "ui_fight_new", "Progress_fixed");
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_holder, "ui_fight_new", "Progress_head");
+            _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_comBar.m_holder, "ui_fight_new", "Progress_liuguang");
+            _effectUI4 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holderNormal, "ui_fight_new", "bottom_appear");
+            _effectUI5 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holderCircle, "ui_fight_new", "circle");
+            //_effectUI6 = EffectUIPool.CreateEffectUI(_ui.m_comAllPerfect.m_holder, "ui_fight_new", "zd_df_dfzj");
+            _effectUI7 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holder0, "ui_fight_new", "Lose_animation");
+            _effectUI8 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holder1, "ui_fight_new", "Good_animation");
+            _effectUI9 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holder2, "ui_fight_new", "Perfect_animation");
+            _effectUI10 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holderResult, "ui_fight_new", "Tail");
+            _effectUI11 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holderHigh, "ui_fight_new", "botton_Highlight");
+            _effectUI12 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comAllPerfect.m_holderLoop, "ui_fight_new", "loop_tx");
+            _effectUI13 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comAllPerfect.m_holder, "ui_fight_new", "3S_textAppear01");
+            _effectUI14 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comAllPerfect.m_holderSmokeIn, "ui_fight_new", "smoke_Approach");
+            _effectUI15 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comAllPerfect.m_holderSmokeOut, "ui_fight_new", "smoke_out");
         }
         }
 
 
         protected override void OnInit()
         protected override void OnInit()

+ 12 - 28
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -39,21 +39,9 @@ namespace GFGGame
 
 
         private GButton _btnActivityDay7;
         private GButton _btnActivityDay7;
 
 
-
-        //private GameObject _effectObj4;
-        //private GoWrapper _wrapper4;
-        private EffectUI _effectUI4;
-
-        private GameObject _effectObj4_1;
-        private GoWrapper _wrapper4_1;
-
-        private GameObject _effectObj5;
-        private GoWrapper _wrapper5;
-
-        private GameObject _effectObj6;
-        private GoWrapper _wrapper6;
-        private GameObject _effectObj7;
-        private GoWrapper _wrapper7;
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
+        private EffectUI _effectUI3;
 
 
         private List<GameObject> _effects = new List<GameObject>();
         private List<GameObject> _effects = new List<GameObject>();
         private List<GoWrapper> _wrappers = new List<GoWrapper>();
         private List<GoWrapper> _wrappers = new List<GoWrapper>();
@@ -74,10 +62,12 @@ namespace GFGGame
                 SceneController.DestroyObjectFromView(_effects[i], _wrappers[i]);
                 SceneController.DestroyObjectFromView(_effects[i], _wrappers[i]);
                 SceneController.DestroyObjectFromView(_effects1[i], _wrappers1[i]);
                 SceneController.DestroyObjectFromView(_effects1[i], _wrappers1[i]);
             }
             }
-            EffectUIPool.Recycle(_effectUI4);
-            _effectUI4 = null;
-            SceneController.DestroyObjectFromView(_effectObj4_1, _wrapper4_1);
-            SceneController.DestroyObjectFromView(_effectObj5, _wrapper5);
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+            EffectUIPool.Recycle(_effectUI3);
+            _effectUI3 = null;
 
 
             if (_sceneObject != null)
             if (_sceneObject != null)
             {
             {
@@ -270,15 +260,9 @@ namespace GFGGame
 
 
         private void AddEffect()
         private void AddEffect()
         {
         {
-
-            //string resPath1 = ResPathUtil.GetViewEffectPath("ui_zjm", "ui_zjm_zzl_d");
-            string resPath3 = ResPathUtil.GetViewEffectPath("ui_zjm", "ui_zjm_zzl");
-            //SceneController.AddObjectToView(_effectObj4, _wrapper4, _ui.m_btnMain.m_holder, resPath1, out _effectObj4, out _wrapper4);
-            _effectUI4 = EffectUIPool.CreateEffectUI(_ui.m_btnMain.m_holder, "ui_zjm", "ui_zjm_zzl_d");
-            SceneController.AddObjectToView(_effectObj4_1, _wrapper4_1, _ui.m_btnMain.m_holder1, resPath3, out _effectObj4_1, out _wrapper4_1);
-
-            string resPath4 = ResPathUtil.GetViewEffectPath("ui_zjm", "ui_zjm_jt");
-            SceneController.AddObjectToView(_effectObj7, _wrapper7, _ui.m_loaRight.m_holder, resPath4, out _effectObj7, out _wrapper7);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_btnMain.m_holder, "ui_zjm", "ui_zjm_zzl_d");
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_btnMain.m_holder1, "ui_zjm", "ui_zjm_zzl");
+            _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_loaRight.m_holder, "ui_zjm", "ui_zjm_jt");
         }
         }
 
 
         private void SetPos()
         private void SetPos()