yyl
2025-08-29 21488796efae93ab7f074d7ad9bfc9d15d82a182
Main/Component/UI/Effect/BattleEffectPlayer.cs
@@ -115,6 +115,12 @@
        }
        //  有特效可能带spine又带unity特效的情况
        spineComp = gameObject.GetComponentInChildren<SkeletonAnimation>(true);
        if (effectConfig.effectPos != null && effectConfig.effectPos.Length >= 2)
        {
            rectTrans.anchoredPosition += new Vector2(effectConfig.effectPos[0], effectConfig.effectPos[1]);
        }
    }
    protected virtual void Clear()
@@ -341,6 +347,7 @@
    public string sortingLayer;
    public int sortingOrder;
    private RectTransform rectTrans;
    protected void OnSortingChanged(string _sortingLayer, int _sortingOrder)
    {
@@ -409,8 +416,8 @@
        GameObject newGo = new GameObject("BattleEffectPlayer_" + effectId);
        newGo.transform.SetParent(parent, false);
        newGo.AddMissingComponent<RectTransform>();
        battleEffectPlayer = newGo.AddComponent<BattleEffectPlayer>();
        battleEffectPlayer.rectTrans = newGo.AddMissingComponent<RectTransform>();
        
        battleEffectPlayer.effectId = effectId;
        battleEffectPlayer.SetActive(true);