From 48ab50008c24393957a64cdac96400cde59c168e Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 10 七月 2025 22:47:05 +0800
Subject: [PATCH] 122 子 【武将】武将系统 / 【武将】武将系统-客户端 - 去掉旧的UIEffect

---
 Main/System/Skill/SkillBaseCell.cs.meta       |    2 
 Main/Component/UI/Common/ItemBehaviour.cs     |   14 -
 Main/System/Scroll/FlipScroll.cs.meta         |    0 
 Main/System/Scroll/ScrollerData.cs            |    0 
 Main/System/Skill.meta                        |    2 
 Main/Component/UI/Common/ItemBaseEffect.cs    |  236 +++++++---------
 Main/System/Scroll/ScrollerController.cs.meta |    0 
 Main/System/Scroll/ScrollerUI.cs.meta         |    0 
 Main/System/Main/HomeWin.cs                   |    2 
 Main/System/Scroll/FlipScroll.cs              |    0 
 Main/Component/UI/Effect/EffectPlayer.cs      |   65 +++-
 Main/System/PhantasmPavilion/AvatarCell.cs    |   24 
 Main/System/Scroll/CellView.cs                |    0 
 Main/System/Scroll/CellView.cs.meta           |    0 
 Main/Component/UI/Effect/EffectMgr.cs         |  125 +-------
 Main/Utility/EnumHelper.cs                    |   31 ++
 Main/System/Scroll/ScrollerData.cs.meta       |    0 
 Main/System/Tip/MarqueeWin.cs                 |    2 
 Main/Component/UI/Core/OutlineColor.cs        |   48 +++
 Main/System/Scroll/ScrollerUI.cs              |    0 
 Main/System/Tip/PopConfirmWin.cs              |    3 
 Main/System/UIBase/UIBase.cs                  |   17 
 /dev/null                                     |   12 
 Main/Utility/UIHelper.cs                      |  125 +++++++-
 Main/System/Skill/SkillBaseCell.cs            |   93 ++++++
 Main/Component/UI/Core/OutlineColor.cs.meta   |    2 
 Main/System/Scroll/ScrollerController.cs      |    0 
 Main/System/Scroll.meta                       |    8 
 28 files changed, 476 insertions(+), 335 deletions(-)

diff --git a/Main/Component/UI/Common/ItemBaseEffect.cs b/Main/Component/UI/Common/ItemBaseEffect.cs
index cf33cb8..3168dbf 100644
--- a/Main/Component/UI/Common/ItemBaseEffect.cs
+++ b/Main/Component/UI/Common/ItemBaseEffect.cs
@@ -1,155 +1,121 @@
 锘縰sing System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
-    public class ItemBaseEffect : MonoBehaviour
+public class ItemBaseEffect : MonoBehaviour
+{
+    [SerializeField] EffectPlayer m_SuitEffect;
+    
+    int itemId = 0;
+
+    private void OnEnable()
     {
-        [SerializeField] UIEffect m_SuitEffect;
-        
-        int itemId = 0;
+        Display(itemId);
+    }
 
-        private void OnEnable()
+    public void Display(int itemId, bool dirty = false)
+    {
+        this.itemId = itemId;
+        var curItem = ItemConfig.Get(this.itemId);
+        bool isPlay = true;
+        if (curItem == null)
         {
-            Display(itemId);
+            isPlay = false;
+            return;
         }
 
-        public void Display(int itemId, bool dirty = false)
+        int effectId = 0;
+        switch (curItem.ItemColor)
         {
-            this.itemId = itemId;
-            var curItem = ItemConfig.Get(this.itemId);
-            bool isPlay = true;
-            if (curItem == null)
-            {
-                isPlay = false;
-                return;
-            }
-
-            int effectId = 0;
-            switch (curItem.ItemColor)
-            {
-                case 4:
-                    effectId = 7119;
-                    break;
-                case 5:
-                    effectId = 7120;
-                    break;
-                case 6:
-                case 7:
-                case 8:
-                    effectId = 7121;
-                    break;
-            }
-
-            if (curItem.BaseEffectID != 0)
-            {
-                effectId = curItem.BaseEffectID;
-            }
-
-            if (m_SuitEffect.effect != effectId)
-            {
-                //鍚屼竴涓綅缃浛鎹㈢壒鏁堥渶瑕佸厛閲婃斁
-                m_SuitEffect.StopImediatly();
-            }
-            m_SuitEffect.effect = effectId;
-
-            if (m_SuitEffect.effect == 0)
-            {
-                isPlay = false;
-            }
-            if (isPlay)
-            {
-                m_SuitEffect.Play();
-            }
-            else
-            {
-                m_SuitEffect.StopImediatly();
-            }
-
-            // if (dirty)
-            // {
-            //     SnxxzGame.Instance.StartCoroutine(Co_SetOrder(this, transform as RectTransform));
-            // }
+            case 4:
+                effectId = 7119;
+                break;
+            case 5:
+                effectId = 7120;
+                break;
+            case 6:
+            case 7:
+            case 8:
+                effectId = 7121;
+                break;
         }
 
-        public static ItemBaseEffect Create(RectTransform transform)
+        if (curItem.BaseEffectID != 0)
         {
-            var go = UIUtility.CreateWidget("ItemBaseEffect", "ItemBaseEffect");
-            var behaviour = go.GetComponent<ItemBaseEffect>();
-
-            // SnxxzGame.Instance.StartCoroutine(Co_SetOrder(behaviour, transform));
-
-            var scale = 1f;
-            var itemBasic = transform.GetComponentInParent<CommonItemBaisc>();
-            if (itemBasic == null)
-                itemBasic = transform.GetComponentInParent<ItemCell>();
-            if (itemBasic != null)
-            {
-                scale = GetEffectScale(itemBasic.format);
-            }
-            // else
-            // {
-            //     var itemBehaviour = transform.GetComponentInParent<ItemBehaviour>();
-            //     if (itemBehaviour != null)
-            //     {
-            //         if (itemBehaviour.backGround != null)
-            //         {
-            //             var size = itemBehaviour.backGround.rectTransform.rect.width;
-            //             scale = size / 84;
-            //         }
-            //     }
-            //     else
-            //     {
-            //         var findPreciousItemBehaviour = transform.GetComponentInParent<FindPreciousItemBehaviour>();
-            //         if (findPreciousItemBehaviour != null)
-            //         {
-            //             scale = 0.86f;  //鏆備笖鍐欐
-            //         }
-            //     }
-            // }
-
-            var rect = go.transform as RectTransform;
-            go.transform.SetParentEx(transform, Vector3.zero, Quaternion.identity, Vector3.one);
-            rect.MatchWhith(transform);
-            go.transform.localScale = Vector3.one * scale;
-            go.transform.SetAsLastSibling();
-
-            return behaviour;
+            effectId = curItem.BaseEffectID;
         }
 
-        static IEnumerator Co_SetOrder(ItemBaseEffect behaviour, RectTransform transform)
+        if (m_SuitEffect.effectId != effectId)
         {
-            yield return null;
-
-            if (transform == null || behaviour == null)
-            {
-                yield break;
-            }
-
-            Canvas canva = transform.GetComponentInParent<Canvas>();
-            if (canva != null)
-            {
-                behaviour.m_SuitEffect.ResetOrder(canva.sortingOrder + 1);
-            }
-
-            if (behaviour.m_SuitEffect.maskArea == null)
-            {
-                behaviour.m_SuitEffect.SetMask();
-            }
+            //鍚屼竴涓綅缃浛鎹㈢壒鏁堥渶瑕佸厛閲婃斁
+            m_SuitEffect.Stop();
         }
+        m_SuitEffect.effectId = effectId;
 
-        static float GetEffectScale(ItemCellformat format)
+        if (m_SuitEffect.effectId == 0)
         {
-            switch (format)
-            {
-                case ItemCellformat.Format_100x100:
-                    return 1.1f;
-                case ItemCellformat.Format_80x80:
-                    return 0.95f;
-                case ItemCellformat.Format_70x70:
-                    return 0.83f;
-                case ItemCellformat.Format_64x64:
-                    return 0.76f;
-                default:
-                    return 1f;
-            }
+            isPlay = false;
+        }
+        if (isPlay)
+        {
+            m_SuitEffect.SetActive(true);
+        }
+        else
+        {
+            m_SuitEffect.SetActive(false);
         }
     }
+
+    public static ItemBaseEffect Create(RectTransform transform)
+    {
+        var go = UIUtility.CreateWidget("ItemBaseEffect", "ItemBaseEffect");
+        var behaviour = go.GetComponent<ItemBaseEffect>();
+
+        var scale = 1f;
+        var itemBasic = transform.GetComponentInParent<CommonItemBaisc>();
+        if (itemBasic == null)
+            itemBasic = transform.GetComponentInParent<ItemCell>();
+        if (itemBasic != null)
+        {
+            scale = GetEffectScale(itemBasic.format);
+        }
+        else
+        {
+            var itemBehaviour = transform.GetComponentInParent<ItemBehaviour>();
+            if (itemBehaviour != null)
+            {
+                if (itemBehaviour.backGround != null)
+                {
+                    var size = itemBehaviour.backGround.rectTransform.rect.width;
+                    scale = size / 84;
+                }
+            }
+
+        }
+
+        var rect = go.transform as RectTransform;
+        go.transform.SetParentEx(transform, Vector3.zero, Quaternion.identity, Vector3.one);
+        rect.MatchWhith(transform);
+        go.transform.localScale = Vector3.one * scale;
+        go.transform.SetAsLastSibling();
+
+        return behaviour;
+    }
+
+
+    static float GetEffectScale(ItemCellformat format)
+    {
+        switch (format)
+        {
+            case ItemCellformat.Format_100x100:
+                return 1.1f;
+            case ItemCellformat.Format_80x80:
+                return 0.95f;
+            case ItemCellformat.Format_70x70:
+                return 0.83f;
+            case ItemCellformat.Format_64x64:
+                return 0.76f;
+            default:
+                return 1f;
+        }
+    }
+}
diff --git a/Main/Component/UI/Common/ItemBehaviour.cs b/Main/Component/UI/Common/ItemBehaviour.cs
index e3de873..8a1e820 100644
--- a/Main/Component/UI/Common/ItemBehaviour.cs
+++ b/Main/Component/UI/Common/ItemBehaviour.cs
@@ -28,19 +28,6 @@
 
     [SerializeField] ItemType m_ItemType = ItemType.Rewards;
 
-    EquipSuitEffect m_EquipSuitEffect;
-    EquipSuitEffect equipSuitEffect
-    {
-        get
-        {
-            if (m_EquipSuitEffect == null)
-            {
-                m_EquipSuitEffect = EquipSuitEffect.Create(transform as RectTransform);
-            }
-            return m_EquipSuitEffect;
-        }
-    }
-
     //鐗╁搧鍩虹鐗规晥锛堢墿鍝佽〃锛�
     ItemBaseEffect m_ItemBaseEffect;
     ItemBaseEffect itemBaseEffect
@@ -146,7 +133,6 @@
                 backGround.SetItemBackGround(itemQuality != 0 ? itemQuality : itemInfo.ItemColor, itemInfo.QualityEchoType);
             }
 
-            equipSuitEffect.Display(itemId);
             itemBaseEffect.Display(itemId);
         }
         catch (Exception e)
diff --git a/Main/Component/UI/Common/SecondFrameLoader2.cs b/Main/Component/UI/Common/SecondFrameLoader2.cs
deleted file mode 100644
index 4b8914b..0000000
--- a/Main/Component/UI/Common/SecondFrameLoader2.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-using UnityEngine;
-using UnityEngine.UI;
-/**
-杩欐槸鏂扮殑浜岀骇鐣岄潰鍔犺浇鍣�
-*/
-
-public enum FrameSize
-{
-    Free,
-    XLarge,
-    Large,
-    Medium,
-    Small,
-}
-
-[ExecuteAlways]
-public class SecondFrameLoader2 : UIPrefabLoader
-{
-    [SerializeField] public FrameSize frameSize;
-
-    [SerializeField] public Vector2 size;
-
-    public string m_TitleKey;
-
-    public override string prefabName { get { return "SecondFrame"; } }
-
-    public override void Create()
-    {
-        base.Create();
-        UpdateSize();
-        InitUI();
-    }
-
-    private void Update()
-    {
-        if (Application.isPlaying)
-            return;
-        UpdateSize();
-    }
-
-    public void InitUI()
-    {
-        var button = this.GetComponentInChildren<ButtonEx>();
-        var window = this.GetComponentInParent<UIBase>();
-        button.AddListener(() =>//鍏抽棴鎸夐挳
-        {
-            Debug.Log("鍏抽棴绐楀彛");
-            window.CloseWindow();
-        });
-        var text = this.GetComponentInChildren<Text>();
-        if (text != null)
-        {
-            if (Application.isPlaying)
-            {
-                text.fontSize = 24;
-                text.resizeTextForBestFit = false;
-                text.rectTransform.sizeDelta = new Vector2(24, 141);
-                if (!string.IsNullOrEmpty(m_TitleKey))
-                    text.text = Language.Get(m_TitleKey);
-            }
-            else
-                text.text = "褰撳墠鏍囬";
-        }
-}
-
-    public void UpdateSize()
-    {
-        if (instance == null)
-            return;
-        switch (frameSize)
-        {
-            case FrameSize.XLarge:
-                {
-                    SetSize(1000, 650);
-                    break;
-                }
-            case FrameSize.Large:
-                {
-                    SetSize(800, 650);
-                    break;
-                }
-            case FrameSize.Medium:
-                {
-                    SetSize(650, 650);
-                    break;
-                }
-            case FrameSize.Small:
-                {
-                    SetSize(550, 650);
-                    break;
-                }
-            case FrameSize.Free:
-                {
-                    SetSize(size.x, size.y);
-                    break;
-                }
-        }
-    }
-
-    private void SetSize(float width, float height)
-    {
-        if (instance == null)
-            return;
-        (instance.transform as RectTransform).sizeDelta = new Vector2(width, height);
-    }
-
-}
-
diff --git a/Main/Component/UI/Common/SecondFrameLoader2.cs.meta b/Main/Component/UI/Common/SecondFrameLoader2.cs.meta
deleted file mode 100644
index 8ac5322..0000000
--- a/Main/Component/UI/Common/SecondFrameLoader2.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 123a6f0275fc88d419990a7dfeb3dfcf
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 
diff --git a/Main/Component/UI/Core/OutlineColor.cs b/Main/Component/UI/Core/OutlineColor.cs
new file mode 100644
index 0000000..c224c8f
--- /dev/null
+++ b/Main/Component/UI/Core/OutlineColor.cs
@@ -0,0 +1,48 @@
+锘縰sing UnityEngine.UI;
+using UnityEngine;
+using System;
+
+public class OutlineColor : Outline
+{
+
+    [SerializeField][HideInInspector]
+    QualityTextColType m_ColorType = QualityTextColType.None;
+    public QualityTextColType colorType
+    {
+        get { return m_ColorType; }
+        set
+        {
+            if (m_ColorType != value)
+            {
+                m_ColorType = value;
+                this.effectColor = UIHelper.GetUIOutlineColor(value);
+            }
+        }
+    }
+
+    [SerializeField][HideInInspector]
+    Vector2 m_EffectDistanceEx = new Vector2(1.5f, -1.5f);
+    public Vector2 effectDistanceEx
+    {
+        get { return m_EffectDistanceEx; }
+        set
+        {
+            if (m_EffectDistanceEx != value)
+            { 
+                m_EffectDistanceEx = value;
+                effectDistance = value;
+            }
+        }
+    }
+
+
+
+
+    protected override void Awake()
+    {
+        this.effectDistance = m_EffectDistanceEx;
+        this.effectColor = UIHelper.GetUIOutlineColor(colorType);
+    }
+
+
+}
diff --git a/Main/Component/UI/Effect/UIEffectTransmitController.cs.meta b/Main/Component/UI/Core/OutlineColor.cs.meta
similarity index 83%
rename from Main/Component/UI/Effect/UIEffectTransmitController.cs.meta
rename to Main/Component/UI/Core/OutlineColor.cs.meta
index 47e7eef..9fd6048 100644
--- a/Main/Component/UI/Effect/UIEffectTransmitController.cs.meta
+++ b/Main/Component/UI/Core/OutlineColor.cs.meta
@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: ef9791258cf62d544871c2a0c053d930
+guid: 73475911b65888b44a39a57cca0bcac3
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2
diff --git a/Main/Component/UI/Effect/EffectMgr.cs b/Main/Component/UI/Effect/EffectMgr.cs
index e0b1024..c2c16de 100644
--- a/Main/Component/UI/Effect/EffectMgr.cs
+++ b/Main/Component/UI/Effect/EffectMgr.cs
@@ -1,32 +1,8 @@
 锘縰sing UnityEngine;
 
 public class EffectMgr : SingletonMonobehaviour<EffectMgr>
-
 {
-    public UIEffectBehaviour GetUIEffect(int id, bool _destroy = false)
-    {
-        EffectConfig effectCfg = EffectConfig.Get(id);
 
-        if (null == effectCfg)
-        {
-            return null;
-        }
-
-        var _prefab = ResManager.Instance.LoadAsset<GameObject>("UIEffect/" + effectCfg.packageName, effectCfg.fxName);
-        if (_prefab == null)
-        {
-            return null;
-        }
-        GameObjectPoolManager.GameObjectPool _pool = GameObjectPoolManager.Instance.RequestPool(_prefab);
-        _prefab = _pool.Request();
-        var _effect = _prefab.GetComponent<UIEffect>();
-        if (_effect != null && _destroy)
-        {
-            Destroy(_effect);
-        }
-        var _behaviour = _prefab.AddMissingComponent<UIEffectBehaviour>();
-        return _behaviour;
-    }
 
     //鐜╁鏄惁涓诲姩灞忚斀浜嗙壒鏁�
     public bool IsNotShowBySetting(int id)
@@ -35,7 +11,8 @@
         if (config == null)
         {
 #if UNITY_EDITOR
-            Debug.LogError("鐗规晥閰嶇疆琛ㄤ腑娌℃湁鎵惧埌id涓�" + id + "鐨勭壒鏁�");
+            if (id != 0)
+                Debug.LogError("鐗规晥閰嶇疆琛ㄤ腑娌℃湁鎵惧埌id涓�" + id + "鐨勭壒鏁�");
 #endif
             return true;
         }
@@ -46,90 +23,28 @@
         return false;
     }
 
-    public UIEffect PlayUIEffect(int id, int renderQueue, Transform parent, bool loop)
-    {
-        if (IsNotShowBySetting(id))
-            return null;
-        UIEffectBehaviour _behaviour = GetUIEffect(id);
-        UIEffect uieffect = null;
-        if (_behaviour != null)
-        {
-            _behaviour.SetActive(false);
-            _behaviour.transform.SetParent(parent);
-            uieffect = _behaviour.AddMissingComponent<UIEffect>();
-            uieffect.target = _behaviour;
-            SetUIEffect(uieffect, id, renderQueue, loop, Vector3.zero, Vector3.zero);
-            uieffect.Active();
-        }
-        return uieffect;
-    }
 
-    public UIEffect PlayUIEffect(int id, int renderQueue, Transform parent, Vector3 _localPos, Vector3 _localRot, bool loop)
-    {
-        if (IsNotShowBySetting(id))
-            return null;
-        UIEffectBehaviour _behaviour = GetUIEffect(id);
-        UIEffect uieffect = null;
-        if (_behaviour != null)
-        {
-            _behaviour.SetActive(false);
-            _behaviour.transform.SetParent(parent);
-            uieffect = _behaviour.AddMissingComponent<UIEffect>();
-            uieffect.target = _behaviour;
-            SetUIEffect(uieffect, id, renderQueue, loop, _localPos, _localRot);
-            uieffect.Active();
-        }
-        return uieffect;
-    }
 
-    public UIEffect PlayUIEffect(int id, int renderQueue, Vector3 _localPos, bool loop = false)
-    {
-        if (IsNotShowBySetting(id))
-            return null;
-        UIEffectBehaviour _behaviour = GetUIEffect(id);
-        UIEffect uieffect = null;
-        if (_behaviour != null)
-        {
-            _behaviour.SetActive(false);
-            //  TODO YYL
-            // _behaviour.transform.SetParent(WindowCenter.Instance.uiRoot.baseCanvas);
-            uieffect = _behaviour.AddMissingComponent<UIEffect>();
-            uieffect.target = _behaviour;
-            SetUIEffect(uieffect, id, renderQueue, loop, _localPos, Vector3.zero);
-            uieffect.Active();
-        }
-        return uieffect;
-    }
+    // public void RecyleUIEffect(int id, GameObject _effectObj)
+    // {
+    //     EffectConfig effectCfg = EffectConfig.Get(id);
 
-    private void SetUIEffect(UIEffect effect, int id, int renderQueue, bool loop, Vector3 _localPos, Vector3 _localRot)
-    {
-        effect.effect = id;
-        effect.renderQueue = renderQueue;
-        effect.loop = loop;
-        effect.effectPos = _localPos;
-        effect.effectRot = _localRot;
-    }
+    //     if (null == effectCfg)
+    //     {
+    //         return;
+    //     }
 
-    public void RecyleUIEffect(int id, GameObject _effectObj)
-    {
-        EffectConfig effectCfg = EffectConfig.Get(id);
+    //     var _prefab = ResManager.Instance.LoadAsset<GameObject>("UIEffect/" + effectCfg.packageName, effectCfg.fxName);
+    //     if (_prefab == null)
+    //     {
+    //         return;
+    //     }
 
-        if (null == effectCfg)
-        {
-            return;
-        }
-
-        var _prefab = ResManager.Instance.LoadAsset<GameObject>("UIEffect/" + effectCfg.packageName, effectCfg.fxName);
-        if (_prefab == null)
-        {
-            return;
-        }
-
-        GameObjectPoolManager.GameObjectPool _pool = GameObjectPoolManager.Instance.RequestPool(_prefab);
-        if (_pool != null)
-        {
-            _pool.Release(_effectObj);
-        }
-    }
+    //     GameObjectPoolManager.GameObjectPool _pool = GameObjectPoolManager.Instance.RequestPool(_prefab);
+    //     if (_pool != null)
+    //     {
+    //         _pool.Release(_effectObj);
+    //     }
+    // }
 }
 
diff --git a/Main/Component/UI/Effect/EffectPlayer.cs b/Main/Component/UI/Effect/EffectPlayer.cs
index 1427000..65cf69e 100644
--- a/Main/Component/UI/Effect/EffectPlayer.cs
+++ b/Main/Component/UI/Effect/EffectPlayer.cs
@@ -14,18 +14,39 @@
 
     [HideInInspector] public GameObject effectTarget = null;
 
-	protected void Start()
-	{
-		if (EffectMgr.Instance.IsNotShowBySetting(effectId))
-		{
-			return;
-		}
+    protected void Start()
+    { 
+        ReStart();
+    }
 
-		if (null != effectTarget)
-		{
-			DestroyImmediate(effectTarget);
-			effectTarget = null;
-		}
+    public void Stop()
+    { 
+        if (null != effectTarget)
+        {
+            DestroyImmediate(effectTarget);
+            effectTarget = null;
+        }
+    }
+
+    public void Play()
+    {
+        ReStart();
+    }
+
+
+
+    protected void ReStart()
+    {
+        if (EffectMgr.Instance.IsNotShowBySetting(effectId))
+        {
+            return;
+        }
+
+        if (null != effectTarget)
+        {
+            DestroyImmediate(effectTarget);
+            effectTarget = null;
+        }
 
         EffectConfig effectCfg = EffectConfig.Get(effectId);
 
@@ -44,19 +65,19 @@
             Debug.LogError($"鍔犺浇UI鐗规晥澶辫触: {effectCfg.packageName}");
             return;
         }
-        
+
         // 瀹炰緥鍖栫壒鏁�
         effectTarget = Instantiate(effectPrefab, transform);
         effectTarget.name = $"Effect_{effectCfg.fxName}";
-        
-        if (null == canvas)
-	        canvas = GetComponentInParent<Canvas>();
 
-	    if (null == canvas)
-	    {
-	    	Debug.LogError("can not find canvas for UIEffect " + effectId);
-	    	return;
-	    }
+        if (null == canvas)
+            canvas = GetComponentInParent<Canvas>();
+
+        if (null == canvas)
+        {
+            Debug.LogError("can not find canvas for UIEffect " + effectId);
+            return;
+        }
 
         // 娣诲姞鐗规晥绌块�忛樆鎸″櫒
         EffectPenetrationBlocker blocker = effectTarget.AddComponent<EffectPenetrationBlocker>();
@@ -66,12 +87,12 @@
         this.DelayFrame(blocker.UpdateSortingOrder);
 
         // blocker.UpdateSortingOrder();
-        
+
         // 鑷姩閿�姣�
         if (autoDestroy)
         {
             Destroy(effectTarget, destroyDelay);
         }
-	}
+    }
 
 }
diff --git a/Main/Component/UI/Effect/UIEffect.cs b/Main/Component/UI/Effect/UIEffect.cs
deleted file mode 100644
index 33eb1d4..0000000
--- a/Main/Component/UI/Effect/UIEffect.cs
+++ /dev/null
@@ -1,291 +0,0 @@
-锘縰sing System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using System;
-using UnityEngine.Rendering;
-using UnityEngine.UI;
-
-#if UNITY_EDITOR
-using UnityEditor;
-#endif
-
-
-
-public class UIEffect : MonoBehaviour
-{
-    public int renderQueue = 3000;
-    public int effect = 0;
-    public UIEffectBehaviour target;
-    public Vector3 effectPos = Vector3.zero;
-    public Vector3 effectRot = Vector3.zero;
-    public Vector3 effectScl = Vector3.one;
-    public bool playOnAwake = false;
-    public bool loop = false;
-    public bool keep = false;
-    public float duration { get; private set; }
-    public bool IsPlaying { get; protected set; }
-    public Action OnComplete;
-    [SerializeField] RectTransform m_MaskArea;
-    public RectTransform maskArea
-    {
-        get { return m_MaskArea; }
-        set { m_MaskArea = value; }
-    }
-    private UIBase retrospectWindow;
-    public void Play()
-    {
-        if (EffectMgr.Instance.IsNotShowBySetting(effect))
-            return;
-        if (target != null)
-        {
-            StopImediatly();
-        }
-        target = EffectMgr.Instance.GetUIEffect(effect, true);
-        if (target != null)
-        {
-            Active();
-        }
-    }
-
-    public void Active()
-    {
-        target.SetActive(true);
-        target.transform.SetParent(this.transform);
-        retrospectWindow = RetrospectWindow(transform);
-        duration = target.duration;
-        target.SetOrder(renderQueue);
-        target.transform.localPosition = effectPos;
-        target.transform.localEulerAngles = effectRot;
-        target.transform.localScale = effectScl;
-        target.SetParticlesScale(effectScl);
-        RockonEffect();
-        IsPlaying = true;
-        var _effectCfg = EffectConfig.Get(effect);
-        if (_effectCfg != null)
-        {
-            SoundPlayer.Instance.PlayUIAudio(_effectCfg.audio);
-        }
-        SetMask();
-    }
-
-    public void ResetOrder(int _order)
-    {
-        renderQueue = _order;
-        if (target != null)
-        {
-            target.SetOrder(renderQueue);
-        }
-    }
-
-    public void SetMask()
-    {
-        if (target == null)
-        {
-            return;
-        }
-        if (maskArea != null)
-        {
-            target.PerformMask(maskArea);
-            return;
-        }
-        var _masks = GetComponentsInParent<RectMask2D>(true);
-        if (_masks != null && _masks.Length > 0)
-        {
-            target.PerformMask(_masks);
-        }
-        else
-        {
-            var _smoothMask = GetComponentsInParent<SmoothMask>(true);
-            if (_smoothMask != null && _smoothMask.Length > 0)
-            {
-                target.PerformMask(_smoothMask[0].rectTransform);
-                return;
-            }
-            target.PerformMask(GetComponentsInParent<Mask>(true));
-        }
-    }
-
-    private void OnWinPreClose(UIBase _window)
-    {
-        if (retrospectWindow != null)
-        {
-            if (retrospectWindow == _window)
-            {
-                StopImediatly();
-            }
-        }
-    }
-    private void RockonEffect()
-    {
-        if (!loop)
-        {
-            this.SetWait(duration);
-            this.DoWaitRestart();
-            this.OnWaitCompelete(OnEffectComplete);
-        }
-    }
-
-    private void OnEffectComplete(Component comp)
-    {
-        this.DoWaitStop();
-        if (target != null)
-        {
-            if (!keep)
-            {
-                EffectMgr.Instance.RecyleUIEffect(effect, target.gameObject);
-                target = null;
-            }
-            if (OnComplete != null)
-            {
-                OnComplete();
-            }
-        }
-        IsPlaying = false;
-    }
-
-    private void OnEnable()
-    {
-        UIManager.Instance.OnCloseWindow += OnWinPreClose;
-        if (playOnAwake)
-        {
-            Play();
-        }
-    }
-
-    private void OnDisable()
-    {
-        UIManager.Instance.OnCloseWindow -= OnWinPreClose;
-        if (target != null && !playOnAwake)
-        {
-            StopImediatly();
-        }
-    }
-
-    public void Stop()
-    {
-        OnEffectComplete(this);
-    }
-    public void StopImediatly()
-    {
-        this.DoWaitStop();
-        if (target != null)
-        {
-            EffectMgr.Instance.RecyleUIEffect(effect, target.gameObject);
-            target = null;
-        }
-        IsPlaying = false;
-    }
-    public void SetLayer(int _layer)
-    {
-        if (target != null)
-        {
-            target.gameObject.SetLayer(_layer, true);
-        }
-    }
-
-
-    private UIBase RetrospectWindow(Transform parent)
-    {
-        if (parent == null)
-        {
-            return null;
-        }
-        UIBase window = null;
-        window = parent.GetComponent<UIBase>();
-        if (window != null)
-        {
-            return window;
-        }
-        else
-        {
-            return RetrospectWindow(parent.parent);
-        }
-    }
-
-    private const string EDITOR_EFFECT_PATH = "Assets/ResourcesOut/Effect/UI/";
-    private const string EFFECT_EXTENAL = ".prefab";
-    public void Preview(string _name)
-    {
-#if UNITY_EDITOR
-        if (target != null)
-        {
-            DestroyImmediate(target);
-        }
-        var _prefab = AssetDatabase.LoadAssetAtPath<GameObject>(StringUtility.Contact(EDITOR_EFFECT_PATH, _name, EFFECT_EXTENAL));
-        if (_prefab != null)
-        {
-            _prefab = Instantiate(_prefab);
-        }
-        target = _prefab.AddComponent<UIEffectBehaviour>();
-        target.SetActive(true);
-        target.transform.SetParent(this.transform);
-        target.SetOrder(renderQueue);
-        //target.PerformMask(GetComponentsInParent<RectMask2D>(true));
-        target.transform.localPosition = Vector3.zero;
-        target.transform.localEulerAngles = Vector3.zero;
-        target.transform.localScale = Vector3.one;
-        Selection.activeGameObject = target.gameObject;
-#endif
-    }
-
-}
-#if UNITY_EDITOR
-[CustomEditor(typeof(UIEffect))]
-[CanEditMultipleObjects]
-public class UIEffectEditor : Editor
-{
-    public UIEffect uieffect;
-    private string effectPath = string.Empty;
-
-    private void OnEnable()
-    {
-        if (target != null)
-        {
-            uieffect = target as UIEffect;
-        }
-    }
-
-    public override void OnInspectorGUI()
-    {
-        if (uieffect == null)
-        {
-            return;
-        }
-        EditorGUILayout.BeginHorizontal();
-        effectPath = EditorGUILayout.TextField("Effect Path", effectPath);
-        EditorGUILayout.EndHorizontal();
-        EditorGUILayout.BeginHorizontal();
-        if (GUILayout.Button("Preview"))
-        {
-            uieffect.Preview(effectPath);
-        }
-        EditorGUILayout.EndHorizontal();
-        EditorGUILayout.BeginHorizontal();
-        uieffect.playOnAwake = EditorGUILayout.Toggle("OnEnable", uieffect.playOnAwake);
-        EditorGUILayout.EndHorizontal();
-        EditorGUILayout.BeginHorizontal();
-        uieffect.effect = EditorGUILayout.IntField("Effect ID", uieffect.effect);
-        EditorGUILayout.EndHorizontal();
-        EditorGUILayout.BeginHorizontal();
-        uieffect.renderQueue = EditorGUILayout.IntField("RenderQueue", uieffect.renderQueue);
-        EditorGUILayout.EndHorizontal();
-        EditorGUILayout.BeginHorizontal();
-        uieffect.loop = EditorGUILayout.Toggle("Loop", uieffect.loop);
-        EditorGUILayout.EndHorizontal();
-        EditorGUILayout.BeginHorizontal();
-        uieffect.maskArea = EditorGUILayout.ObjectField("Mask", uieffect.maskArea, typeof(RectTransform), true) as RectTransform;
-        EditorGUILayout.EndHorizontal();
-        EditorGUILayout.BeginHorizontal();
-        if (GUILayout.Button("ResetOrder"))
-        {
-            uieffect.target.SetOrder(uieffect.renderQueue);
-        }
-        EditorGUILayout.EndHorizontal();
-
-        EditorGUILayout.BeginHorizontal();
-        uieffect.effectScl = EditorGUILayout.Vector3Field("Scale", uieffect.effectScl);
-        EditorGUILayout.EndHorizontal();
-    }
-}
-#endif
-
diff --git a/Main/Component/UI/Effect/UIEffect.cs.meta b/Main/Component/UI/Effect/UIEffect.cs.meta
deleted file mode 100644
index 6e586b5..0000000
--- a/Main/Component/UI/Effect/UIEffect.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 39dcca0c219ff5543b682ac83ebbbe74
-timeCreated: 1503409144
-licenseType: Free
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 
diff --git a/Main/Component/UI/Effect/UIEffectBehaviour.cs b/Main/Component/UI/Effect/UIEffectBehaviour.cs
deleted file mode 100644
index 5540e39..0000000
--- a/Main/Component/UI/Effect/UIEffectBehaviour.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-锘縰sing System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.UI;
-public class UIEffectBehaviour : MonoBehaviour
-{
-    private List<ParticleSystem> m_Particles = new List<ParticleSystem>();
-    private List<Animator> m_Animators = new List<Animator>();
-    private List<Renderer> m_Renderers = new List<Renderer>();
-
-    public float duration { get; private set; }
-    private Vector3 m_RectMaskPosition;
-    private bool m_RectMaskEnable;
-    private RectTransform m_RectMask;
-
-    public bool IsAnimatorControl { get; private set; }
-
-    private void Awake()
-    {
-        GetComponent();
-        this.gameObject.SetLayer(LayerUtility.UIEffectLayer, true);
-    }
-
-    public void SetParticlesScale(Vector3 _scale)
-    {
-        if (_scale != Vector3.one)
-        foreach (var par in m_Particles)
-        {
-            par.transform.localScale = _scale;
-        }
-    }
-
-
-    public void SetOrder(int _order)
-    {
-        foreach (var _renderer in m_Renderers)
-        {
-            _renderer.sortingOrder = _order;
-            _renderer.sortingLayerName = "UI";
-        }
-    }
-
-    public void PerformMask(RectMask2D[] _masks)
-    {
-        RectTransform _rect = null;
-        var _mask = _masks == null || _masks.Length == 0 ? null : _masks[0];
-        if (_mask == null)
-        {
-                _rect = null;
-        }
-        else
-        {
-            _rect = _mask.rectTransform;
-        }
-        PerformMask(_rect);
-    }
-
-    public void PerformMask(Mask[] _masks)
-    {
-        RectTransform _rect = null;
-        var _mask = _masks == null || _masks.Length == 0 ? null : _masks[0];
-        if (_mask == null)
-        {
-            _rect = null;
-        }
-        else
-        {
-            _rect = _mask.rectTransform;
-        }
-        PerformMask(_rect);
-    }
-
-    public void PerformMask(RectTransform _mask)
-    {
-        m_RectMask = _mask;
-        m_RectMaskEnable = _mask != null;
-        if (_mask != null)
-        {
-            m_RectMaskPosition = _mask.position;
-            _mask.GetWorldCorners(s_RectMask);
-            s_ClipRect.x = s_RectMask[0].x; s_ClipRect.y = s_RectMask[0].y;
-            s_ClipRect.z = s_RectMask[2].x; s_ClipRect.w = s_RectMask[2].y;
-        }
-        foreach (var _renderer in m_Renderers)
-        {
-            var _mat = _renderer.material;
-            SetClipRect(_mat, s_ClipRect, m_RectMaskEnable);
-        }
-    }
-
-    private void GetComponent()
-    {
-        transform.GetComponentsInChildren(true, m_Renderers);
-        IsAnimatorControl = false;
-        TraverseChild(transform);
-    }
-
-    private void TraverseChild(Transform parent)
-    {
-        ParticleSystem particle = parent.GetComponent<ParticleSystem>();
-        if (particle != null)
-        {
-            if (particle.main.duration > duration && !IsAnimatorControl)
-            {
-                duration = particle.main.duration;
-            }
-            m_Particles.Add(particle);
-        }
-        Animator animator = parent.GetComponent<Animator>();
-        if (animator != null)
-        {
-            m_Animators.Add(animator);
-            AnimatorStateInfo state = animator.GetCurrentAnimatorStateInfo(0);
-            duration = state.length > duration ? state.length : duration;
-            IsAnimatorControl = true;
-        }
-        foreach (Transform child in parent)
-        {
-            TraverseChild(child);
-        }
-    }
-
-    private Vector4 s_ClipRect = Vector4.zero;
-    private Vector3[] s_RectMask = new Vector3[4];
-
-    private void SetClipRect(Material _mat, Vector4 _clipRect, bool _mask)
-    {
-        _mat.SetVector("_ClipRect", _clipRect);
-        _mat.SetFloat("_UseClipRect", _mask ? 1 : 0);
-    }
-
-    public Animator GetAnimator()
-    {
-        if (IsAnimatorControl && m_Animators.Count > 0)
-        {
-            return m_Animators[0];
-        }
-        return null;
-    }
-
-    private void LateUpdate()
-    {
-        if (m_RectMask != null && (m_RectMaskPosition != m_RectMask.position))
-        {
-            m_RectMaskPosition = m_RectMask.position;
-            PerformMask(m_RectMask);
-        }
-    }
-
-    private void OnDisable()
-    {
-        m_RectMask = null;
-    }
-}
-
diff --git a/Main/Component/UI/Effect/UIEffectBehaviour.cs.meta b/Main/Component/UI/Effect/UIEffectBehaviour.cs.meta
deleted file mode 100644
index bcdc61b..0000000
--- a/Main/Component/UI/Effect/UIEffectBehaviour.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 8876d172a02c7e84e93a167132081f51
-timeCreated: 1517986550
-licenseType: Free
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 
diff --git a/Main/Component/UI/Effect/UIEffectTransmitController.cs b/Main/Component/UI/Effect/UIEffectTransmitController.cs
deleted file mode 100644
index ba4b672..0000000
--- a/Main/Component/UI/Effect/UIEffectTransmitController.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-锘縰sing UnityEngine;
-
-public class UIEffectTransmitController : MonoBehaviour
-{
-    public Transform start;
-    public Transform end;
-    public UIEffect transmit;
-    public int scale = 1; //鏍规嵁鐣岄潰鑷璋冩暣姣斾緥
-
-    private void Update()
-    {
-
-        if (transform == null)
-        {
-            return;
-        }
-
-        if (transmit == null)
-        {
-            return;
-        }
-
-        if (start == null)
-        {
-            return;
-        }
-
-        if (end == null)
-        {
-            return;
-        }
-
-        transmit.transform.position = start.position;
-        transmit.transform.localScale = new Vector3(Vector3.Distance(end.position, start.position) * scale, 1, 1);
-        //transmit.transform.localRotation.z 鍊兼牴鎹� end鍜宻tart鐨勪綅缃绠�, end鍦╯tart鐨勫彸杈规椂,localRotation.z = 0, end鍦╯tart鐨勫乏杈规椂,localRotation.z = 180
-        float angle = Mathf.Atan2(end.position.y - start.position.y, end.position.x - start.position.x) * Mathf.Rad2Deg;
-        transmit.transform.localRotation = Quaternion.Euler(0, 0, angle);
-
-    }
-
-    private void OnDisable()
-    {
-        start = null;
-        end = null;
-        transmit = null;
-    }
-
-}
\ No newline at end of file
diff --git a/Main/System/Equip/EquipSuitEffect.cs b/Main/System/Equip/EquipSuitEffect.cs
deleted file mode 100644
index 5a92e97..0000000
--- a/Main/System/Equip/EquipSuitEffect.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-锘縰sing System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-    public class EquipSuitEffect : MonoBehaviour
-    {
-        [SerializeField] UIEffect m_SuitEffect;
-
-        int itemId = 0;
-
-        private void OnEnable()
-        {
-            Display(itemId);
-        }
-
-        public void Display(int itemId, bool dirty = false)
-        {
-            this.itemId = itemId;
-            // var isSuitEquip = ItemLogicUtility.Instance.IsSuitEquip(itemId);
-            // if (isSuitEquip)
-            // {
-            //     m_SuitEffect.Play();
-            // }
-            // else
-            // {
-            //     m_SuitEffect.StopImediatly();
-            // }
-
-            // if (dirty)
-            // {
-            //     SnxxzGame.Instance.StartCoroutine(Co_SetOrder(this, transform as RectTransform));
-            // }
-        }
-
-        public static EquipSuitEffect Create(RectTransform transform)
-        {
-            var go = UIUtility.CreateWidget("EquipSuitEffect", "EquipSuitEffect");
-            var behaviour = go.GetComponent<EquipSuitEffect>();
-
-            // SnxxzGame.Instance.StartCoroutine(Co_SetOrder(behaviour, transform));
-
-            var scale = 1f;
-            var itemBasic = transform.GetComponentInParent<CommonItemBaisc>();
-            if (itemBasic != null)
-            {
-                scale = GetEffectScale(itemBasic.format);
-            }
-            // else
-            // {
-            //     var itemBehaviour = transform.GetComponentInParent<ItemBehaviour>();
-            //     if (itemBehaviour != null)
-            //     {
-            //         if (itemBehaviour.backGround != null)
-            //         {
-            //             var size = itemBehaviour.backGround.rectTransform.rect.width;
-            //             scale = size / 84;
-            //         }
-            //     }
-            // }
-
-            var rect = go.transform as RectTransform;
-            go.transform.SetParentEx(transform, Vector3.zero, Quaternion.identity, Vector3.one);
-            rect.MatchWhith(transform);
-            go.transform.localScale = Vector3.one * scale;
-            go.transform.SetAsLastSibling();
-
-            return behaviour;
-        }
-
-        static IEnumerator Co_SetOrder(EquipSuitEffect behaviour, RectTransform transform)
-        {
-            yield return null;
-
-            if (transform == null || behaviour == null)
-            {
-                yield break;
-            }
-
-            Canvas canva = transform.GetComponentInParent<Canvas>();
-            if (canva != null)
-            {
-                behaviour.m_SuitEffect.ResetOrder(canva.sortingOrder + 1);
-            }
-
-            if (behaviour.m_SuitEffect.maskArea == null)
-            {
-                behaviour.m_SuitEffect.SetMask();
-            }
-        }
-
-        static float GetEffectScale(ItemCellformat format)
-        {
-            switch (format)
-            {
-                case ItemCellformat.Format_100x100:
-                    return 1.1f;
-                case ItemCellformat.Format_80x80:
-                    return 0.95f;
-                case ItemCellformat.Format_70x70:
-                    return 0.8f;
-                case ItemCellformat.Format_64x64:
-                    return 0.75f;
-                default:
-                    return 1f;
-            }
-        }
-    }
\ No newline at end of file
diff --git a/Main/System/Equip/EquipSuitEffect.cs.meta b/Main/System/Equip/EquipSuitEffect.cs.meta
deleted file mode 100644
index 2e7f060..0000000
--- a/Main/System/Equip/EquipSuitEffect.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 08b930c33878e864a9f8479b5359c96f
-timeCreated: 1557466872
-licenseType: Pro
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 
diff --git a/Main/System/Main/HomeWin.cs b/Main/System/Main/HomeWin.cs
index 97b94a3..6fb80c6 100644
--- a/Main/System/Main/HomeWin.cs
+++ b/Main/System/Main/HomeWin.cs
@@ -26,7 +26,7 @@
     [SerializeField] Text taskNumText;
     [SerializeField] Image awardIcon;
     [SerializeField] Text awardCnt;
-    [SerializeField] UIEffect taskEffect;
+    [SerializeField] EffectPlayer taskEffect;
 
 
     //鍏冲崱
diff --git a/Main/System/PhantasmPavilion/AvatarCell.cs b/Main/System/PhantasmPavilion/AvatarCell.cs
index 3240df7..0d9cade 100644
--- a/Main/System/PhantasmPavilion/AvatarCell.cs
+++ b/Main/System/PhantasmPavilion/AvatarCell.cs
@@ -88,27 +88,27 @@
         }
     }
 
-    UIEffect m_AvatarUIEffect;
-    private UIEffect avatarUIEffect
+    EffectPlayer m_AvatarUIEffect;
+    private EffectPlayer avatarUIEffect
     {
         get
         {
             if (m_AvatarUIEffect == null)
             {
-                m_AvatarUIEffect = this.GetComponent<UIEffect>("AvatarCell/Img_Avatar");
+                m_AvatarUIEffect = this.GetComponent<EffectPlayer>("AvatarCell/Img_Avatar");
             }
             return m_AvatarUIEffect;
         }
     }
 
-    UIEffect m_AvatarFrameUIEffect;
-    private UIEffect avatarFrameUIEffect
+    EffectPlayer m_AvatarFrameUIEffect;
+    private EffectPlayer avatarFrameUIEffect
     {
         get
         {
             if (m_AvatarFrameUIEffect == null)
             {
-                m_AvatarFrameUIEffect = this.GetComponent<UIEffect>("AvatarCell/Img_AvatarFrame");
+                m_AvatarFrameUIEffect = this.GetComponent<EffectPlayer>("AvatarCell/Img_AvatarFrame");
             }
             return m_AvatarFrameUIEffect;
         }
@@ -160,7 +160,7 @@
 
     private void InitAvatarUI(int avatarID, int avatarUIEffectID)
     {
-        avatarUIEffect.Stop();
+        avatarUIEffect?.Stop();
         avatarUIFrame.enabled = false;
         if (!PlayerFaceConfig.HasKey(avatarID))
             return;
@@ -188,14 +188,14 @@
 
         if (!EffectConfig.HasKey(avatarUIEffectID))
             return;
-        avatarUIEffect.effect = avatarUIEffectID;
-        avatarUIEffect.loop = true;
+        avatarUIEffect.effectId = avatarUIEffectID;
+        // avatarUIEffect.loop = true;
         avatarUIEffect.Play();
     }
 
     private void InitAvatarFrameUI(int avatarFrameID, int avatarFrameUIEffectID)
     {
-        avatarFrameUIEffect.Stop();
+        avatarFrameUIEffect?.Stop();
         avatarFrameUIFrame.enabled = false;
         if (!PlayerFacePicConfig.HasKey(avatarFrameID))
             return;
@@ -223,8 +223,8 @@
 
         if (!EffectConfig.HasKey(avatarFrameUIEffectID))
             return;
-        avatarUIEffect.effect = avatarFrameUIEffectID;
-        avatarUIEffect.loop = true;
+        avatarUIEffect.effectId = avatarFrameUIEffectID;
+        // avatarUIEffect.loop = true;
         avatarUIEffect.Play();
     }
 }
diff --git a/Main/System/Scroll.meta b/Main/System/Scroll.meta
new file mode 100644
index 0000000..3d56c61
--- /dev/null
+++ b/Main/System/Scroll.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c1ae185223108c54388b2570cb6b4758
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/Skill/CellView.cs b/Main/System/Scroll/CellView.cs
similarity index 100%
rename from Main/System/Skill/CellView.cs
rename to Main/System/Scroll/CellView.cs
diff --git a/Main/System/Skill/CellView.cs.meta b/Main/System/Scroll/CellView.cs.meta
similarity index 100%
rename from Main/System/Skill/CellView.cs.meta
rename to Main/System/Scroll/CellView.cs.meta
diff --git a/Main/System/Skill/FlipScroll.cs b/Main/System/Scroll/FlipScroll.cs
similarity index 100%
rename from Main/System/Skill/FlipScroll.cs
rename to Main/System/Scroll/FlipScroll.cs
diff --git a/Main/System/Skill/FlipScroll.cs.meta b/Main/System/Scroll/FlipScroll.cs.meta
similarity index 100%
rename from Main/System/Skill/FlipScroll.cs.meta
rename to Main/System/Scroll/FlipScroll.cs.meta
diff --git a/Main/System/Skill/ScrollerController.cs b/Main/System/Scroll/ScrollerController.cs
similarity index 100%
rename from Main/System/Skill/ScrollerController.cs
rename to Main/System/Scroll/ScrollerController.cs
diff --git a/Main/System/Skill/ScrollerController.cs.meta b/Main/System/Scroll/ScrollerController.cs.meta
similarity index 100%
rename from Main/System/Skill/ScrollerController.cs.meta
rename to Main/System/Scroll/ScrollerController.cs.meta
diff --git a/Main/System/Skill/ScrollerData.cs b/Main/System/Scroll/ScrollerData.cs
similarity index 100%
rename from Main/System/Skill/ScrollerData.cs
rename to Main/System/Scroll/ScrollerData.cs
diff --git a/Main/System/Skill/ScrollerData.cs.meta b/Main/System/Scroll/ScrollerData.cs.meta
similarity index 100%
rename from Main/System/Skill/ScrollerData.cs.meta
rename to Main/System/Scroll/ScrollerData.cs.meta
diff --git a/Main/System/Skill/ScrollerUI.cs b/Main/System/Scroll/ScrollerUI.cs
similarity index 100%
rename from Main/System/Skill/ScrollerUI.cs
rename to Main/System/Scroll/ScrollerUI.cs
diff --git a/Main/System/Skill/ScrollerUI.cs.meta b/Main/System/Scroll/ScrollerUI.cs.meta
similarity index 100%
rename from Main/System/Skill/ScrollerUI.cs.meta
rename to Main/System/Scroll/ScrollerUI.cs.meta
diff --git a/Main/System/Skill.meta b/Main/System/Skill.meta
index 3d56c61..da91e11 100644
--- a/Main/System/Skill.meta
+++ b/Main/System/Skill.meta
@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: c1ae185223108c54388b2570cb6b4758
+guid: 1d795cb72a0e7f34dbc29ba9ff86777a
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}
diff --git a/Main/System/Skill/SkillBaseCell.cs b/Main/System/Skill/SkillBaseCell.cs
new file mode 100644
index 0000000..d8dd906
--- /dev/null
+++ b/Main/System/Skill/SkillBaseCell.cs
@@ -0,0 +1,93 @@
+锘縰sing UnityEngine;
+using UnityEngine.UI;
+using UnityEngine.Events;
+
+public class SkillBaseCell : MonoBehaviour
+{
+
+    Image m_SkillIcon;
+    Image skillIcon
+    {
+        get
+        {
+            if (m_SkillIcon == null)
+            {
+                m_SkillIcon = this.transform.GetComponent<Image>("Container_SkillCell/Img_Icon");
+            }
+            return m_SkillIcon;
+        }
+    }
+
+    Button m_SkillBtn;
+    Button skillBtn
+    {
+        get
+        {
+            if (m_SkillBtn == null)
+            {
+                m_SkillBtn = this.transform.GetComponent<Button>("Container_SkillCell");
+            }
+            return m_SkillBtn;
+        }
+    }
+
+
+    Text m_SkillType;
+    Text skillType
+    {
+        get
+        {
+            if (m_SkillType == null)
+            {
+                m_SkillType = this.transform.GetComponent<Text>("Container_SkillCell/type");
+            }
+            return m_SkillType;
+        }
+    }
+
+    void Awake()
+    {
+        LoadPrefab();
+    }
+
+    private void Init(int skillID, UnityAction onclick, bool showType = false)
+    {
+        var config = SkillConfig.Get(skillID);
+        skillIcon.SetSprite(config.IconName);
+        skillBtn.AddListener(onclick);
+
+        if (showType)
+        {
+            skillType.text = Language.Get(config.FuncType == 23 ? "HeroSkillType_1" : "HeroSkillType_2");
+        }
+        else
+        { 
+            skillType.text = string.Empty;
+        }
+    }
+
+    GameObject cellContainer;
+    protected void LoadPrefab()
+    {
+        if (cellContainer != null)
+            return;
+        
+        var tmp = transform.Find("Container_SkillCell");
+        if (tmp != null)
+        {
+            cellContainer = tmp.gameObject;
+            return;
+        }
+        if (cellContainer == null)
+        {
+            cellContainer = UIUtility.CreateWidget("SkillBaseCell", "Container_SkillCell");
+
+            if (cellContainer != null)
+            {
+                cellContainer.transform.SetParentEx(this.transform, Vector3.zero, Quaternion.identity, Vector3.one);
+                cellContainer.transform.SetAsFirstSibling();
+            }
+        }
+    }
+}
+
diff --git a/Main/Component/UI/Effect/UIEffectTransmitController.cs.meta b/Main/System/Skill/SkillBaseCell.cs.meta
similarity index 83%
copy from Main/Component/UI/Effect/UIEffectTransmitController.cs.meta
copy to Main/System/Skill/SkillBaseCell.cs.meta
index 47e7eef..e57abf1 100644
--- a/Main/Component/UI/Effect/UIEffectTransmitController.cs.meta
+++ b/Main/System/Skill/SkillBaseCell.cs.meta
@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: ef9791258cf62d544871c2a0c053d930
+guid: 73fe4ad712c0103409678bbc847e4116
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2
diff --git a/Main/System/Tip/MarqueeWin.cs b/Main/System/Tip/MarqueeWin.cs
index b8f6026..c356d54 100644
--- a/Main/System/Tip/MarqueeWin.cs
+++ b/Main/System/Tip/MarqueeWin.cs
@@ -12,7 +12,7 @@
     [SerializeField] RichText marqueeText;
     [SerializeField] RectTransform marqueeBg;
     [SerializeField] TweenCurve tweenCurve;
-    [SerializeField] UIEffect m_Effect;
+    [SerializeField] EffectPlayer m_Effect;
 
     Vector3 fromPos;
     Vector3 toPos;
diff --git a/Main/System/Tip/PopConfirmWin.cs b/Main/System/Tip/PopConfirmWin.cs
index f4048cc..5a96b83 100644
--- a/Main/System/Tip/PopConfirmWin.cs
+++ b/Main/System/Tip/PopConfirmWin.cs
@@ -15,13 +15,12 @@
     [SerializeField] Button popCancelBtn;
     [SerializeField] RichText popConfirmInfo;
     [SerializeField] Text popConfirmTitle;
-    [SerializeField] Button closeBtn;
     protected override void InitComponent()
     {
         base.InitComponent();
         popConfirmBtn.onClick.AddListener(OnPopConfirmOkBtn);
         popCancelBtn.onClick.AddListener(OnPopConfirmCancelBtn);
-        closeBtn.onClick.AddListener(OnPopConfirmCancelExBtn);
+        btnClickEmptyCloseEvent = OnPopConfirmCancelExBtn;
     }
 
     protected override void OnPreOpen()
diff --git a/Main/System/UIBase/UIBase.cs b/Main/System/UIBase/UIBase.cs
index 53420e0..efdcddc 100644
--- a/Main/System/UIBase/UIBase.cs
+++ b/Main/System/UIBase/UIBase.cs
@@ -72,12 +72,13 @@
     //  鎵撳紑閬僵
     [SerializeField] public bool openMask = false;
 
-    //  鐐瑰嚮绌虹櫧鍖哄煙鍏抽棴鐣岄潰
+    //  榛樿鐐瑰嚮绌虹櫧鍖哄煙鍏抽棴鐣岄潰
     [SerializeField] public bool clickEmptySpaceClose = false;
 
     private GameObject screenMask = null;
 
     private Button btnClickEmptyClose;
+    public Action btnClickEmptyCloseEvent = null;   //鎻愪緵鐐瑰嚮绌虹櫧鍖哄煙鍏抽棴鐣岄潰鐨勫洖璋�
 
     //  璺烵neLevelWin鑱斿姩 瀹為檯涓婃槸闇�瑕佺户鎵胯嚜OneLevelWin鎵嶈兘鐢熸晥鐨勫�� 浣跨敤闇�瑕佹敞鎰�
     int m_FunctionOrder = 0;
@@ -143,12 +144,20 @@
             //寤惰繜鍒涘缓浼氬鑷村眰绾у湪ScreenMask涔嬩笂
             GameObject goBtnESC = GameObject.Instantiate(Resources.Load<GameObject>("Prefabs/ClickEmptyCloseMask"), transform);
             btnClickEmptyClose = goBtnESC.GetComponent<Button>();
-            btnClickEmptyClose.AddListener(CloseWindow);
             btnClickEmptyClose.transform.SetAsFirstSibling();
             await UniTask.DelayFrame(5);
 
-            btnClickEmptyClose = goBtnESC.GetComponent<Button>();
-            btnClickEmptyClose.AddListener(CloseWindow);
+            btnClickEmptyClose.AddListener(()=>
+            {
+                if (btnClickEmptyCloseEvent != null)
+                {
+                    btnClickEmptyCloseEvent();
+                }
+                else
+                { 
+                    CloseWindow();
+                }
+            });
         }
     }
 
diff --git a/Main/Utility/EnumHelper.cs b/Main/Utility/EnumHelper.cs
index db2a6d9..17754b0 100644
--- a/Main/Utility/EnumHelper.cs
+++ b/Main/Utility/EnumHelper.cs
@@ -1057,6 +1057,24 @@
 
 }
 
+//鍝佽川鏂囧瓧鎻忚竟棰滆壊
+public enum QualityTextColType
+{
+    None = -1,
+    itemcucao = 0, //绮楃硻
+    itemputong = 1, //鏅��
+    itemjingliang = 2, //绮捐壇
+    itemxiyou = 3, //绋�鏈�
+    itemshishi = 4, //鍙茶瘲
+    itemchuanqi = 5, //浼犲
+    itemshenhua = 6, //绁炶瘽
+    itemwuxia = 7, //鏃犳殗
+    itemanjin = 8, //鏆楅噾
+    itemjueyi = 9, //缁濊壓
+    itemyuanzu = 10, //鍏冪
+    itembuxiu = 11, //涓嶆溄
+    itemyonghen = 12, //姘告亽
+}
 
 public enum TextColType
 {
@@ -1087,9 +1105,20 @@
     /// (204, 204, 204, 255)
     /// </summary>
     Gray = 16,
+    //鐗╁搧鍝佽川棰滆壊
+    itemjingliang = 17, //绮捐壇
+    itemxiyou = 18, //绋�鏈�
+    itemshishi = 19, //鍙茶瘲
+    itemchuanqi = 20, //浼犲
+    itemshenhua = 21, //绁炶瘽
+    itemwuxia = 22, //鏃犳殗
+    itemanjin = 23, //鏆楅噾
+    itemjueyi = 24, //缁濊壓
+    itemyuanzu = 25, //鍏冪
+    itembuxiu = 26, //涓嶆溄
+    itemyonghen = 27, //姘告亽
 
 }
-
 
 public enum E_ModelResType
 {
diff --git a/Main/Utility/UIHelper.cs b/Main/Utility/UIHelper.cs
index 4853b76..2827ce4 100644
--- a/Main/Utility/UIHelper.cs
+++ b/Main/Utility/UIHelper.cs
@@ -512,7 +512,7 @@
     public static readonly Color s_DarkPurpleColor = new Color32(236, 75, 246, 255);
     public static readonly Color s_DarkBlueColor = new Color32(49, 206, 251, 255);//31cefb
     public static readonly Color s_DarkOrangeColor = new Color32(248, 152, 59, 255);
-    public static readonly Color s_DarkWhiteColor = new Color32(247, 247, 247, 255);
+    public static readonly Color s_DarkWhiteColor = new Color32(255, 255, 255, 255);    //ffffff
     public static readonly Color s_DarkGreenColor = new Color32(42, 227, 55, 255);//2ae337
 
     public static readonly Color s_NavyBrown = new Color32(110, 76, 49, 255);//6e4c31
@@ -520,7 +520,7 @@
     public static readonly Color s_NavyYellow = new Color32(255, 239, 71, 255);
     public static readonly Color s_LightGreen = new Color32(42, 227, 55, 255);//2ae337
     public static readonly Color s_LightWhite = new Color32(245, 246, 230, 255); //f5f6e6
-    public static readonly Color s_Gray = new Color32(204, 204, 204, 255);
+    public static readonly Color s_Gray = new Color32(187, 187, 187, 255);  //bbbbbb
     public static readonly Color s_Gold = new Color32(255, 239, 71, 255);//ffef47
     public static readonly Color s_EarthYellow = new Color32(248, 152, 59, 255);//f8983b
 
@@ -599,23 +599,33 @@
         switch (itemColor)
         {
             case 0:
-                return GetUIColor(TextColType.White, bright);
+                return GetUIColor(TextColType.Gray, bright);
             case 1:
                 return GetUIColor(TextColType.White, bright);
             case 2:
-                return GetUIColor(TextColType.Blue, bright);
+                return GetUIColor(TextColType.itemjingliang, bright);
             case 3:
-                return GetUIColor(TextColType.Purple, bright);
+                return GetUIColor(TextColType.itemxiyou, bright);
             case 4:
-                return GetUIColor(TextColType.Orange, bright);
+                return GetUIColor(TextColType.itemshishi, bright);
             case 5:
-                return GetUIColor(TextColType.Red, bright);
+                return GetUIColor(TextColType.itemchuanqi, bright);
             case 6:
+                return GetUIColor(TextColType.itemshenhua, bright);
             case 7:
+                return GetUIColor(TextColType.itemwuxia, bright);
             case 8:
-                return GetUIColor(TextColType.Pink, bright);
+                return GetUIColor(TextColType.itemanjin, bright);
             case 9:
-                return GetUIColor(TextColType.Green, bright);
+                return GetUIColor(TextColType.itemjueyi, bright);
+            case 10:
+                return GetUIColor(TextColType.itemyuanzu, bright);
+            case 11:
+                return GetUIColor(TextColType.itembuxiu, bright);
+            case 12:
+                return GetUIColor(TextColType.itemyonghen, bright);    
+
+
         }
         return GetUIColor(TextColType.White, bright);
     }
@@ -654,8 +664,90 @@
                 return s_LightWhite;
             case TextColType.Gray:
                 return s_Gray;
+            case TextColType.itemjingliang:
+                // 729de4 绮捐壇
+                return new Color32(114, 157, 228, 255);
+            case TextColType.itemxiyou:
+                // c87bfa绋�鏈�
+                return new Color32(199, 123, 253, 255);
+            case TextColType.itemshishi:
+                // f6de56 鍙茶瘲
+                return new Color32(246, 222, 86, 255);
+            case TextColType.itemchuanqi:
+                // fe8534 浼犲
+                return new Color32(254, 133, 52, 255);
+            case TextColType.itemshenhua:
+                // fe4a47 绁炶瘽
+                return new Color32(254, 66, 71, 255);
+            case TextColType.itemwuxia:
+                // eb5ce9 鏃犵憰
+                return new Color32(235, 90, 233, 255);
+            case TextColType.itemanjin:
+                // f9e29f 鏆楅噾
+                return new Color32(254, 181, 68, 255);
+            case TextColType.itemjueyi:
+                // cdfef2 缁濊壓
+                return new Color32(205, 239, 242, 255);
+            case TextColType.itemyuanzu:
+                // dfbbed 鍏冪
+                return new Color32(223, 187, 237, 255);
+            case TextColType.itembuxiu:
+                // 5eeff2 涓嶆溄
+                return new Color32(94, 239, 242, 255);
+            case TextColType.itemyonghen:
+                // f5b4ea 姘告亽
+                return new Color32(245, 180, 234, 255);
         }
         return bright ? s_BrightWhiteColor : s_DarkWhiteColor;
+    }
+
+
+    //鎻忚竟棰滆壊锛屽搴斿搧璐�
+    public static Color GetUIOutlineColor(QualityTextColType type)
+    {
+        switch (type)
+        {
+            case QualityTextColType.itemcucao:
+                // 2d2d2d 绮楃硻
+                return new Color32(45, 45, 45, 255);
+            case QualityTextColType.itemputong:
+                // 424242 鏅��
+                return new Color32(66, 66, 66, 255);
+            case QualityTextColType.itemjingliang:
+                // 172543 绮捐壇
+                return new Color32(23, 37, 67, 255);
+            case QualityTextColType.itemxiyou:
+                // 2a0f30 绋�鏈�
+                return new Color32(42, 15, 48, 255);
+            case QualityTextColType.itemshishi:
+                // 4a2f00 鍙茶瘲
+                return new Color32(74, 47, 0, 255);
+            case QualityTextColType.itemchuanqi:
+                // 451800 浼犲
+                return new Color32(69, 24, 0, 255);
+            case QualityTextColType.itemshenhua:
+                // 510000 绁炶瘽
+                return new Color32(81, 0, 0, 255);
+            case QualityTextColType.itemwuxia:
+                // 43003e 鏃犵憰
+                return new Color32(67, 0, 62, 255);
+            case QualityTextColType.itemanjin:
+                // 6f4401 鏆楅噾
+                return new Color32(111, 68, 1, 255);
+            case QualityTextColType.itemjueyi:
+                // 203995 缁濊壓
+                return new Color32(32, 57, 149, 255);
+            case QualityTextColType.itemyuanzu:
+                // 461f5d 鍏冪
+                return new Color32(70, 31, 93, 255);
+            case QualityTextColType.itembuxiu:
+                // 2e3975 涓嶆溄
+                return new Color32(46, 57, 117, 255);
+            case QualityTextColType.itemyonghen:
+                // 5d1d52 姘告亽
+                return new Color32(93, 29, 82, 255);
+        }
+        return new Color32(0, 0, 0, 255);
     }
 
     private static Regex m_TextColorRegex = new Regex("<color=#[0-9a-zA-Z]+>(.*)</color>", RegexOptions.Singleline);
@@ -783,20 +875,7 @@
         return msg;
     }
 
-    // public static int GetItemColor(int _id, Dictionary<int, List<int>> _dict = null)
-    // {
-    //     int _itemColor = 0;
-    //     var _itemCfg = ItemConfig.Get(_id);
-    //     if (_itemCfg != null)
-    //     {
-    //         _itemColor = _itemCfg.ItemColor;
-    //         if (_itemCfg.Type == 113 && _dict != null)
-    //         {
-    //             _itemColor = ItemLogicUtility.Instance.GetItemQuality(_itemCfg.ID, _dict);
-    //         }
-    //     }
-    //     return _itemColor;
-    // }
+
 
     public static Color GetPropertyColor(int property)
     {

--
Gitblit v1.8.0